pub struct Length(/* private fields */);Expand description
SIMPLE-TLV-encoded length.
By definition, in the range 0..=65535
The length field consists of one or three consecutive bytes.
- If the first byte is not
0xFF, then the length field consists of a single byte encoding a number from zero to 254. - If the first byte is
0xFF, then the length field consists of the subsequent two bytes interpreted as big-endian integer, with any value from zero to 65,535.
Implementations§
Trait Implementations§
Source§impl Encodable for Length
impl Encodable for Length
Source§impl Ord for Length
impl Ord for Length
Source§impl PartialOrd for Length
impl PartialOrd for Length
Source§impl<'a> TryFrom<&'a [&'a dyn Encodable]> for Length
Calculate the sum of the encoded lengths of the encodables.
impl<'a> TryFrom<&'a [&'a dyn Encodable]> for Length
Calculate the sum of the encoded lengths of the encodables.
impl Copy for Length
impl Eq for Length
impl StructuralPartialEq for Length
Auto Trait Implementations§
impl Freeze for Length
impl RefUnwindSafe for Length
impl Send for Length
impl Sync for Length
impl Unpin for Length
impl UnwindSafe for Length
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