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

Method remove

src/darkbird/database.rs:198–219  ·  view source on GitHub ↗
(&self, key: K)

Source from the content-addressed store, hash-verified

196
197 #[inline]
198 pub async fn remove<K, Doc>(&self, key: K) -> Result<(), SessionResult>
199 where
200 Doc: Serialize + DeserializeOwned + Clone + Send + 'static + Document,
201 K: Serialize
202 + DeserializeOwned
203 + PartialOrd
204 + Ord
205 + PartialEq
206 + Eq
207 + Hash
208 + Clone
209 + Send
210 + Sync
211 + 'static
212 {
213 match self.datastores.get::<Storage<K, Doc>>() {
214 None => Err(SessionResult::DataStoreNotFound),
215 Some(datastore) => {
216 datastore.remove(key).await
217 }
218 }
219 }
220
221
222

Callers 1

vec_removeMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected