| 1279 | } |
| 1280 | |
| 1281 | fn get_crdt_branch( |
| 1282 | &self, |
| 1283 | key: &[u8; 12], |
| 1284 | ) -> PristineResult<Option<crate::crdt::tables::SerializedBranch>> { |
| 1285 | use crate::crdt::tables::{decode_branch_value, BRANCHES}; |
| 1286 | let table = crdt_table_opt!(self, BRANCHES); |
| 1287 | let result = match table.get(key)? { |
| 1288 | Some(guard) => { |
| 1289 | let bytes: [u8; 24] = *guard.value(); |
| 1290 | Some(decode_branch_value(&bytes)) |
| 1291 | } |
| 1292 | None => None, |
| 1293 | }; |
| 1294 | Ok(result) |
| 1295 | } |
| 1296 | |
| 1297 | fn get_crdt_branch_after(&self, branch_key: &[u8; 12]) -> PristineResult<Option<[u8; 12]>> { |
| 1298 | use crate::crdt::tables::BRANCH_AFTER; |