(
&self,
key: &[u8; 12],
)
| 1191 | } |
| 1192 | |
| 1193 | fn get_crdt_leaf( |
| 1194 | &self, |
| 1195 | key: &[u8; 12], |
| 1196 | ) -> PristineResult<Option<crate::crdt::tables::SerializedLeaf>> { |
| 1197 | use crate::crdt::tables::{decode_leaf_value, LEAVES}; |
| 1198 | let table = crdt_table_opt!(self, LEAVES); |
| 1199 | let result = match table.get(key)? { |
| 1200 | Some(guard) => { |
| 1201 | let bytes: [u8; 22] = *guard.value(); |
| 1202 | Some(decode_leaf_value(&bytes)) |
| 1203 | } |
| 1204 | None => None, |
| 1205 | }; |
| 1206 | Ok(result) |
| 1207 | } |
| 1208 | |
| 1209 | fn get_trunk_by_path(&self, path: &str) -> PristineResult<Option<crate::crdt::TrunkId>> { |
| 1210 | use crate::crdt::tables::{decode_trunk_id, PATH_TRUNK}; |
no test coverage detected