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

Method fetch_view

src/darkbird/storage.rs:305–318  ·  view source on GitHub ↗
(&self, view_name: &str)

Source from the content-addressed store, hash-verified

303 /// fetch view
304 #[inline]
305 pub fn fetch_view(&self, view_name: &str) -> Vec<Ref<K, Doc>> {
306 match self.tag_index.lookup_view(view_name) {
307 Some(rf) => {
308 let mut result = Vec::with_capacity(rf.value().len());
309 for k in rf.value().iter() {
310 if let Some(kd) = self.collection.get(&k) {
311 result.push(kd);
312 }
313 }
314 result
315 }
316 None => vec![]
317 }
318 }
319
320
321 /// search by text

Callers 1

mainFunction · 0.45

Calls 4

lookup_viewMethod · 0.80
lenMethod · 0.80
iterMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected