pub enum BlockLength {
Fixed(usize),
Variable(usize),
}Expand description
Length of field printed by block
Variants§
Fixed(usize)
Fixed length like numbers with padding
Variable(usize)
Variable length such as string descriptors - contained value is the heading (min) length
Implementations§
Source§impl BlockLength
impl BlockLength
Sourcepub fn variable_len(self) -> Option<usize>
pub fn variable_len(self) -> Option<usize>
Get the variable length if [BlockLength::Variable] else None
Trait Implementations§
Source§impl Debug for BlockLength
impl Debug for BlockLength
Source§impl PartialEq for BlockLength
impl PartialEq for BlockLength
impl Eq for BlockLength
impl StructuralPartialEq for BlockLength
Auto Trait Implementations§
impl Freeze for BlockLength
impl RefUnwindSafe for BlockLength
impl Send for BlockLength
impl Sync for BlockLength
impl Unpin for BlockLength
impl UnsafeUnpin for BlockLength
impl UnwindSafe for BlockLength
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more