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

Method range

src/darkbird/database.rs:250–272  ·  view source on GitHub ↗
(&self, field_name: &str, from: String, to: String)

Source from the content-addressed store, hash-verified

248
249 #[inline]
250 pub fn range<K, Doc>(&self, field_name: &str, from: String, to: String) -> Result<Vec<Ref<K, Doc>>, SessionResult>
251 where
252 Doc: Serialize + DeserializeOwned + Clone + Send + 'static + Document,
253 K: Serialize
254 + DeserializeOwned
255 + PartialOrd
256 + Ord
257 + PartialEq
258 + Eq
259 + Hash
260 + Clone
261 + Send
262 + Sync
263 + 'static
264 {
265 match self.datastores.get::<Storage<K, Doc>>() {
266 None => Err(SessionResult::DataStoreNotFound),
267 Some(datastore) => {
268 let res = datastore.range(field_name, from, to);
269 Ok(res)
270 }
271 }
272 }
273
274
275

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected