pub struct DnodeFramingVersion;Expand description
Stock capability advertising the supported dnode framing
versions on this build. Today the local set is [1, 2]; v1
is the implemented framing and v2 is reserved for the next
stage’s wire upgrade.
Trait Implementations§
Source§impl Capability for DnodeFramingVersion
impl Capability for DnodeFramingVersion
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 DnodeFramingVersion
impl RefUnwindSafe for DnodeFramingVersion
impl Send for DnodeFramingVersion
impl Sync for DnodeFramingVersion
impl Unpin for DnodeFramingVersion
impl UnsafeUnpin for DnodeFramingVersion
impl UnwindSafe for DnodeFramingVersion
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