MCPcopy Create free account
hub / github.com/Rustixir/darkbird / fetch_view

Method fetch_view

src/darkbird/database.rs:357–379  ·  view source on GitHub ↗
(&self, view_name: &str)

Source from the content-addressed store, hash-verified

355
356 #[inline]
357 pub fn fetch_view<K, Doc>(&self, view_name: &str) -> Result<Vec<Ref<K, Doc>>, SessionResult>
358 where
359 Doc: Serialize + DeserializeOwned + Clone + Send + 'static + Document,
360 K: Serialize
361 + DeserializeOwned
362 + PartialOrd
363 + Ord
364 + PartialEq
365 + Eq
366 + Hash
367 + Clone
368 + Send
369 + Sync
370 + 'static
371 {
372 match self.datastores.get::<Storage<K, Doc>>() {
373 None => Err(SessionResult::DataStoreNotFound),
374 Some(datastore) => {
375 let res = datastore.fetch_view(view_name);
376 Ok(res)
377 }
378 }
379 }
380
381
382

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected