| 1342 | } |
| 1343 | |
| 1344 | fn get_crdt_branch( |
| 1345 | &self, |
| 1346 | key: &[u8; 12], |
| 1347 | ) -> PristineResult<Option<crate::crdt::tables::SerializedBranch>> { |
| 1348 | use crate::crdt::tables::{decode_branch_value, BRANCHES}; |
| 1349 | let table = crdt_table_opt!(self, BRANCHES); |
| 1350 | let result = match table.get(key)? { |
| 1351 | Some(guard) => { |
| 1352 | let bytes: [u8; 24] = *guard.value(); |
| 1353 | Some(decode_branch_value(&bytes)) |
| 1354 | } |
| 1355 | None => None, |
| 1356 | }; |
| 1357 | Ok(result) |
| 1358 | } |
| 1359 | |
| 1360 | fn get_crdt_branch_after(&self, branch_key: &[u8; 12]) -> PristineResult<Option<[u8; 12]>> { |
| 1361 | use crate::crdt::tables::BRANCH_AFTER; |