(
&self,
key: &[u8; 12],
)
| 1302 | } |
| 1303 | |
| 1304 | fn get_crdt_leaf( |
| 1305 | &self, |
| 1306 | key: &[u8; 12], |
| 1307 | ) -> PristineResult<Option<crate::crdt::tables::SerializedLeaf>> { |
| 1308 | use crate::crdt::tables::{decode_leaf_value, LEAVES}; |
| 1309 | let table = crdt_table_opt!(self, LEAVES); |
| 1310 | let result = match table.get(key)? { |
| 1311 | Some(guard) => { |
| 1312 | let bytes: [u8; 22] = *guard.value(); |
| 1313 | Some(decode_leaf_value(&bytes)) |
| 1314 | } |
| 1315 | None => None, |
| 1316 | }; |
| 1317 | Ok(result) |
| 1318 | } |
| 1319 | |
| 1320 | fn get_trunk_by_path(&self, path: &str) -> PristineResult<Option<crate::crdt::TrunkId>> { |
| 1321 | use crate::crdt::tables::{decode_trunk_id, PATH_TRUNK}; |
no test coverage detected