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

Method search

src/darkbird/database.rs:384–406  ·  view source on GitHub ↗
(&self, text: String)

Source from the content-addressed store, hash-verified

382
383 #[inline]
384 pub fn search<K, Doc>(&self, text: String) -> Result<Vec<Ref<K, Doc>>, SessionResult>
385 where
386 Doc: Serialize + DeserializeOwned + Clone + Send + 'static + Document,
387 K: Serialize
388 + DeserializeOwned
389 + PartialOrd
390 + Ord
391 + PartialEq
392 + Eq
393 + Hash
394 + Clone
395 + Send
396 + Sync
397 + 'static
398 {
399 match self.datastores.get::<Storage<K, Doc>>() {
400 None => Err(SessionResult::DataStoreNotFound),
401 Some(datastore) => {
402 let res = datastore.search(text);
403 Ok(res)
404 }
405 }
406 }
407
408
409

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected