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

Method vec_lookup

src/darkbird/database.rs:79–87  ·  view source on GitHub ↗
(&self, vector_id: &VectorId)

Source from the content-addressed store, hash-verified

77
78 #[inline]
79 pub fn vec_lookup(&self, vector_id: &VectorId) -> Result<Option<(VectorId, Vector)>, SessionResult> {
80 match self.datastores.get::<VecStorage>() {
81 None => Err(SessionResult::DataStoreNotFound),
82 Some(datastore) => {
83 let res = datastore.lookup(vector_id);
84 Ok(res)
85 }
86 }
87 }
88
89 /// // Define a query vector
90 /// let query_vector = vec![2.0, 3.0, 4.0];

Callers

nothing calls this directly

Calls 1

lookupMethod · 0.45

Tested by

no test coverage detected