pub enum ExpectedLen {
Exact(usize),
AtLeast(usize),
OneOf(&'static [usize]),
Multiple(usize),
}Expand description
What length(s) a Data Item is permitted to take on the wire, used for
CodecError::InvalidDataItemLength reporting. Several DLEP Data Items are
not fixed-width — Connection Points are 5 or 7, Status / Peer Type are
“at least 1”, Extensions Supported is a multiple of 2 — so a single
expected: usize would be misleading.
Variants§
Exact(usize)
Length must be exactly this value.
AtLeast(usize)
Length must be at least this value.
OneOf(&'static [usize])
Length must be one of the listed values.
Multiple(usize)
Length must be a non-negative multiple of this value.
Trait Implementations§
Source§impl Clone for ExpectedLen
impl Clone for ExpectedLen
impl Copy for ExpectedLen
Source§impl Debug for ExpectedLen
impl Debug for ExpectedLen
Source§impl Display for ExpectedLen
impl Display for ExpectedLen
impl Eq for ExpectedLen
Source§impl PartialEq for ExpectedLen
impl PartialEq for ExpectedLen
impl StructuralPartialEq for ExpectedLen
Auto Trait Implementations§
impl Freeze for ExpectedLen
impl RefUnwindSafe for ExpectedLen
impl Send for ExpectedLen
impl Sync for ExpectedLen
impl Unpin for ExpectedLen
impl UnsafeUnpin for ExpectedLen
impl UnwindSafe for ExpectedLen
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