pub enum ElementLength {
Fixed(u32),
Variable8,
Variable16,
Variable24,
Variable32,
Callback(fn(id: u8) -> ElementLength),
}Expand description
Type of length used by a specific message codec. This describes how the length of an element should be encoded in the packet.
Variants§
Fixed(u32)
A fixed length element, the length is not written in the header.
Variable8
The length is encoded on 8 bits in the element’s header.
Variable16
The length is encoded on 16 bits in the element’s header.
Variable24
The length is encoded on 24 bits in the element’s header.
Variable32
The length is encoded on 32 bits in the element’s header.
Callback(fn(id: u8) -> ElementLength)
The real length of the element is queried dynamically with a callback, given the element’s identifier.
Implementations§
Source§impl ElementLength
impl ElementLength
Trait Implementations§
Source§impl Clone for ElementLength
impl Clone for ElementLength
Source§fn clone(&self) -> ElementLength
fn clone(&self) -> ElementLength
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ElementLength
impl Debug for ElementLength
Source§impl PartialEq for ElementLength
impl PartialEq for ElementLength
impl Copy for ElementLength
impl Eq for ElementLength
impl StructuralPartialEq for ElementLength
Auto Trait Implementations§
impl Freeze for ElementLength
impl RefUnwindSafe for ElementLength
impl Send for ElementLength
impl Sync for ElementLength
impl Unpin for ElementLength
impl UnwindSafe for ElementLength
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.