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

Method iter

src/darkbird/database.rs:411–433  ·  view source on GitHub ↗
(&self)

Source from the content-addressed store, hash-verified

409
410 #[inline]
411 pub fn iter<K, Doc>(&self) -> Result<Iter<'_, K, Doc>, SessionResult>
412 where
413 Doc: Serialize + DeserializeOwned + Clone + Send + 'static + Document,
414 K: Serialize
415 + DeserializeOwned
416 + PartialOrd
417 + Ord
418 + PartialEq
419 + Eq
420 + Hash
421 + Clone
422 + Send
423 + Sync
424 + 'static
425 {
426 match self.datastores.get::<Storage<K, Doc>>() {
427 None => Err(SessionResult::DataStoreNotFound),
428 Some(datastore) => {
429 let res = datastore.iter();
430 Ok(res)
431 }
432 }
433 }
434
435
436 #[inline]

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected