| 1297 | } |
| 1298 | |
| 1299 | fn get_crdt_branch( |
| 1300 | &self, |
| 1301 | key: &[u8; 12], |
| 1302 | ) -> PristineResult<Option<crate::crdt::tables::SerializedBranch>> { |
| 1303 | use crate::crdt::tables::{decode_branch_value, BRANCHES}; |
| 1304 | let table = crdt_table_opt!(self, BRANCHES); |
| 1305 | let result = match table.get(key)? { |
| 1306 | Some(guard) => { |
| 1307 | let bytes: [u8; 24] = *guard.value(); |
| 1308 | Some(decode_branch_value(&bytes)) |
| 1309 | } |
| 1310 | None => None, |
| 1311 | }; |
| 1312 | Ok(result) |
| 1313 | } |
| 1314 | |
| 1315 | fn get_crdt_branch_after(&self, branch_key: &[u8; 12]) -> PristineResult<Option<[u8; 12]>> { |
| 1316 | use crate::crdt::tables::BRANCH_AFTER; |