pub struct CrdtObjectFormat;Expand description
Stock capability advertising the supported CRDT object wire formats.
Trait Implementations§
Source§impl Capability for CrdtObjectFormat
impl Capability for CrdtObjectFormat
Source§fn supported_values(&self) -> Vec<u32>
fn supported_values(&self) -> Vec<u32>
Locally supported values, ordered from lowest preference
to highest preference. The first element is also used as
the “floor” when negotiation finds no overlap.
Source§fn merge(&self, peer: &[u32]) -> Option<u32>
fn merge(&self, peer: &[u32]) -> Option<u32>
Returns the highest local value also supported by
peer,
or None when there is no overlap. The notion of
“highest” is owned by the implementation.Source§fn encode_value(&self, v: &u32) -> Vec<u8> ⓘ
fn encode_value(&self, v: &u32) -> Vec<u8> ⓘ
Serialise a value to a stable byte sequence. Used to
build the on-the-wire advertisement.
Source§fn decode_value(&self, b: &[u8]) -> Option<u32>
fn decode_value(&self, b: &[u8]) -> Option<u32>
Inverse of
Capability::encode_value. Returning None
causes the registry to drop the malformed value when
merging a peer ad.Auto Trait Implementations§
impl Freeze for CrdtObjectFormat
impl RefUnwindSafe for CrdtObjectFormat
impl Send for CrdtObjectFormat
impl Sync for CrdtObjectFormat
impl Unpin for CrdtObjectFormat
impl UnsafeUnpin for CrdtObjectFormat
impl UnwindSafe for CrdtObjectFormat
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