(
&self,
key: &[u8; 12],
)
| 1145 | |
| 1146 | impl crate::pristine::traits::CrdtTxnT for ReadTxn { |
| 1147 | fn get_crdt_trunk( |
| 1148 | &self, |
| 1149 | key: &[u8; 12], |
| 1150 | ) -> PristineResult<Option<crate::crdt::tables::SerializedTrunk>> { |
| 1151 | use crate::crdt::tables::{decode_trunk_value, TRUNKS}; |
| 1152 | let table = crdt_table_opt!(self, TRUNKS); |
| 1153 | let result = match table.get(key)? { |
| 1154 | Some(guard) => { |
| 1155 | let bytes_copy: Vec<u8> = guard.value().to_vec(); |
| 1156 | decode_trunk_value(&bytes_copy) |
| 1157 | } |
| 1158 | None => None, |
| 1159 | }; |
| 1160 | Ok(result) |
| 1161 | } |
| 1162 | |
| 1163 | fn get_crdt_inode_trunk(&self, inode: u64) -> PristineResult<Option<[u8; 12]>> { |
| 1164 | use crate::crdt::tables::INODE_TRUNK; |
no test coverage detected