pub enum LengthCode {
Lc0,
Lc1,
Lc2,
Lc3,
Lc4,
Lc5,
Lc6,
Lc7,
}Expand description
EMHEADER length code. OMG XTypes 1.3 §7.4.2.
The code tells a reader how to skip a member it does not understand,
which is what makes @mutable evolution work at all.
Variants§
Lc0
One byte.
Lc1
Two bytes.
Lc2
Four bytes.
Lc3
Eight bytes.
Lc4
Length in a following NEXTINT.
Lc5
Length as the member’s own leading word, which doubles as the NEXTINT. Required for a variable-length member.
Lc6
Length is NEXTINT times four.
Lc7
Length is NEXTINT times eight.
Implementations§
Source§impl LengthCode
impl LengthCode
Sourcepub const fn fixed_size(self) -> Option<u32>
pub const fn fixed_size(self) -> Option<u32>
The fixed payload size a code implies, when it implies one.
Sourcepub const fn reuses_leading_length(self) -> bool
pub const fn reuses_leading_length(self) -> bool
Whether the member’s own leading length word serves as the NEXTINT, which is what distinguishes LC5 from LC4.
Trait Implementations§
Source§impl Clone for LengthCode
impl Clone for LengthCode
impl Copy for LengthCode
Source§impl Debug for LengthCode
impl Debug for LengthCode
impl Eq for LengthCode
Source§impl Hash for LengthCode
impl Hash for LengthCode
Source§impl Ord for LengthCode
impl Ord for LengthCode
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialEq for LengthCode
impl PartialEq for LengthCode
Source§impl PartialOrd for LengthCode
impl PartialOrd for LengthCode
impl StructuralPartialEq for LengthCode
Auto Trait Implementations§
impl Freeze for LengthCode
impl RefUnwindSafe for LengthCode
impl Send for LengthCode
impl Sync for LengthCode
impl Unpin for LengthCode
impl UnsafeUnpin for LengthCode
impl UnwindSafe for LengthCode
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