MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / snapshot_views

Method snapshot_views

atomic-core/src/pristine/txn/write/view.rs:31–43  ·  view source on GitHub ↗
(&self)

Source from the content-addressed store, hash-verified

29 }
30
31 fn snapshot_views(&self) -> PristineResult<Vec<(String, ViewState)>> {
32 let table = self.txn.open_table(VIEWS)?;
33 let mut rows = Vec::new();
34 for entry in table.iter()? {
35 let (name, value) = entry?;
36 rows.push((
37 name.value().to_string(),
38 deserialize_view_state(value.value())?,
39 ));
40 }
41 rows.sort_by(|left, right| left.0.cmp(&right.0));
42 Ok(rows)
43 }
44
45 fn list_views(&self) -> PristineResult<Vec<String>> {
46 Ok(self

Callers 2

list_viewsMethod · 0.45

Calls 5

deserialize_view_stateFunction · 0.85
valueMethod · 0.80
iterMethod · 0.45
pushMethod · 0.45
cmpMethod · 0.45

Tested by

no test coverage detected