(
&self,
key: &[u8; 12],
)
| 1256 | |
| 1257 | impl crate::pristine::traits::CrdtTxnT for ReadTxn { |
| 1258 | fn get_crdt_trunk( |
| 1259 | &self, |
| 1260 | key: &[u8; 12], |
| 1261 | ) -> PristineResult<Option<crate::crdt::tables::SerializedTrunk>> { |
| 1262 | use crate::crdt::tables::{decode_trunk_value, TRUNKS}; |
| 1263 | let table = crdt_table_opt!(self, TRUNKS); |
| 1264 | let result = match table.get(key)? { |
| 1265 | Some(guard) => { |
| 1266 | let bytes_copy: Vec<u8> = guard.value().to_vec(); |
| 1267 | decode_trunk_value(&bytes_copy) |
| 1268 | } |
| 1269 | None => None, |
| 1270 | }; |
| 1271 | Ok(result) |
| 1272 | } |
| 1273 | |
| 1274 | fn get_crdt_inode_trunk(&self, inode: u64) -> PristineResult<Option<[u8; 12]>> { |
| 1275 | use crate::crdt::tables::INODE_TRUNK; |
no test coverage detected