MCPcopy Create free account
hub / github.com/GraphLite-AI/GraphLite / scan_prefix

Method scan_prefix

graphlite/src/storage/persistent/sled.rs:76–86  ·  view source on GitHub ↗
(
        &self,
        prefix: &[u8],
    )

Source from the content-addressed store, hash-verified

74 }
75
76 fn scan_prefix(
77 &self,
78 prefix: &[u8],
79 ) -> StorageResult<Box<dyn Iterator<Item = StorageResult<(Vec<u8>, Vec<u8>)>> + '_>> {
80 let iter = self.tree.scan_prefix(prefix).map(|result| {
81 result
82 .map(|(k, v)| (k.to_vec(), v.to_vec()))
83 .map_err(|e| StorageDriverError::BackendSpecific(e.to_string()))
84 });
85 Ok(Box::new(iter))
86 }
87
88 fn batch_get(&self, keys: &[&[u8]]) -> StorageResult<Vec<Option<Vec<u8>>>> {
89 let mut results = Vec::with_capacity(keys.len());

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected