#[non_exhaustive]pub enum MulticodecLength {
Fixed(usize),
Variable,
NotApplicable,
}Expand description
Semantic length rule for the value described by a multicodec entry.
The primitive registry represents these cases with separate enum variants, so transport adapters cannot mistake an algorithm identifier for a key.
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
impl 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