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

Method get

src/darkbird/storage_redis.rs:154–158  ·  view source on GitHub ↗
(&self, key: &K)

Source from the content-addressed store, hash-verified

152 }
153
154 pub fn get(&self, key: &K) -> Option<Arc<Doc>> {
155
156 let state = self.shared.state.lock().unwrap();
157 state.entries.get(key).map(|entry| entry.data.clone())
158 }
159
160 pub fn set(&self, key: K, value: Doc, expire: Option<Duration>) {
161 let mut state: std::sync::MutexGuard<'_, State<K, Doc>> = self.shared.state.lock().unwrap();

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected