pub enum StringHeader {
Compact(CompactStringHeader),
Extended(ExtendedStringHeader),
}Expand description
Header representing a string.
Variants§
Implementations§
Source§impl StringHeader
impl StringHeader
Sourcepub fn compact_unchecked(len: u8) -> Self
pub fn compact_unchecked(len: u8) -> Self
Creates a compact header, without checking invariants.
Sourcepub fn for_len(len: usize, packing_mode: PackingMode) -> Self
pub fn for_len(len: usize, packing_mode: PackingMode) -> Self
Creates a header for a given map’s length, for a given packing_mode.
Trait Implementations§
Source§impl Clone for StringHeader
impl Clone for StringHeader
Source§fn clone(&self) -> StringHeader
fn clone(&self) -> StringHeader
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 StringHeader
impl Debug for StringHeader
Source§impl From<StringHeader> for Header
impl From<StringHeader> for Header
Source§fn from(value: StringHeader) -> Self
fn from(value: StringHeader) -> Self
Converts to this type from the input type.
Source§impl PartialEq for StringHeader
impl PartialEq for StringHeader
impl Copy for StringHeader
impl Eq for StringHeader
impl StructuralPartialEq for StringHeader
Auto Trait Implementations§
impl Freeze for StringHeader
impl RefUnwindSafe for StringHeader
impl Send for StringHeader
impl Sync for StringHeader
impl Unpin for StringHeader
impl UnwindSafe for StringHeader
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