pub struct ProllyKey(pub [u8; 16]);Expand description
A 16-byte Prolly tree key - the unit the chunker and tree operate on.
This is a newtype over [u8; 16] with custom Serde impls that emit the
value as a CBOR byte string (major type 2) per SPEC §4.3. The default
serde derive would emit a CBOR array of sixteen u8 integers, which
is incorrect for the mnem canonical form.
All four stable IDs (NodeId, EdgeId, ChangeId, OperationId)
convert into ProllyKey via From. Construct raw keys with
ProllyKey::new or the tuple literal ProllyKey([u8; 16]).
Tuple Fields§
§0: [u8; 16]Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for ProllyKey
impl<'de> Deserialize<'de> for ProllyKey
Source§fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
Deserialize this value from the given Serde deserializer. Read more
Source§impl Ord for ProllyKey
impl Ord for ProllyKey
Source§impl PartialOrd for ProllyKey
impl PartialOrd for ProllyKey
impl Copy for ProllyKey
impl Eq for ProllyKey
impl StructuralPartialEq for ProllyKey
Auto Trait Implementations§
impl Freeze for ProllyKey
impl RefUnwindSafe for ProllyKey
impl Send for ProllyKey
impl Sync for ProllyKey
impl Unpin for ProllyKey
impl UnsafeUnpin for ProllyKey
impl UnwindSafe for ProllyKey
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more