MCPcopy Create free account
hub / github.com/emwalker/digraph / fetch_objects_with_context

Method fetch_objects_with_context

backend/src/store.rs:167–185  ·  view source on GitHub ↗
(
        &self,
        ids: Vec<ExternalId>,
        take: usize,
        context_id: RepoId,
    )

Source from the content-addressed store, hash-verified

165 }
166
167 pub async fn fetch_objects_with_context(
168 &self,
169 ids: Vec<ExternalId>,
170 take: usize,
171 context_id: RepoId,
172 ) -> Result<Vec<git::Object>> {
173 let keys = ids
174 .into_iter()
175 .take(take)
176 .map(|oid| Okey(oid, context_id))
177 .collect::<Vec<Okey>>();
178
179 Ok(self
180 .object_loader
181 .load_many(keys)
182 .await?
183 .into_values()
184 .collect::<Vec<git::Object>>())
185 }
186
187 pub async fn fetch_topic(&self, topic_id: ExternalId) -> Result<Option<git::Topic>> {
188 let key = Okey(topic_id, self.viewer.context_repo_id);

Callers 3

fetch_objectsMethod · 0.80
childrenMethod · 0.80

Calls 1

OkeyClass · 0.85

Tested by

no test coverage detected