#[non_exhaustive]pub enum MulticodecLength {
Fixed(usize),
Variable,
NotApplicable,
}Expand description
Semantic length rule for the value described by a multicodec entry.
The registry uses zero for both variable-length key material and entries where a key length does not apply. Keeping those meanings distinct here prevents boundary adapters from treating an algorithm identifier as a variable-length key codec.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Fixed(usize)
Values have the exact byte length carried by the variant.
Variable
Valid value lengths vary within limits defined by the owning codec.
NotApplicable
A value length is not meaningful for this registry entry.
Trait Implementations§
Source§impl Clone for MulticodecLength
impl Clone for MulticodecLength
Source§fn clone(&self) -> MulticodecLength
fn clone(&self) -> MulticodecLength
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for MulticodecLength
Source§impl Debug for MulticodecLength
impl Debug for MulticodecLength
impl Eq for MulticodecLength
Source§impl PartialEq for MulticodecLength
impl PartialEq for MulticodecLength
impl StructuralPartialEq for MulticodecLength
Auto Trait Implementations§
impl Freeze for MulticodecLength
impl RefUnwindSafe for MulticodecLength
impl Send for MulticodecLength
impl Sync for MulticodecLength
impl Unpin for MulticodecLength
impl UnsafeUnpin for MulticodecLength
impl UnwindSafe for MulticodecLength
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