(
&self,
key: &[u8; 12],
)
| 1319 | |
| 1320 | impl crate::pristine::traits::CrdtTxnT for ReadTxn { |
| 1321 | fn get_crdt_trunk( |
| 1322 | &self, |
| 1323 | key: &[u8; 12], |
| 1324 | ) -> PristineResult<Option<crate::crdt::tables::SerializedTrunk>> { |
| 1325 | use crate::crdt::tables::{decode_trunk_value, TRUNKS}; |
| 1326 | let table = crdt_table_opt!(self, TRUNKS); |
| 1327 | let result = match table.get(key)? { |
| 1328 | Some(guard) => { |
| 1329 | let bytes_copy: Vec<u8> = guard.value().to_vec(); |
| 1330 | decode_trunk_value(&bytes_copy) |
| 1331 | } |
| 1332 | None => None, |
| 1333 | }; |
| 1334 | Ok(result) |
| 1335 | } |
| 1336 | |
| 1337 | fn get_crdt_inode_trunk(&self, inode: u64) -> PristineResult<Option<[u8; 12]>> { |
| 1338 | use crate::crdt::tables::INODE_TRUNK; |
no test coverage detected