pub enum Header {
Int(IntHeader),
String(StringHeader),
Seq(SeqHeader),
Map(MapHeader),
Float(FloatHeader),
Bytes(BytesHeader),
Bool(BoolHeader),
Unit(UnitHeader),
Null(NullHeader),
}Expand description
A value’s header.
Variants§
Int(IntHeader)
Represents a integer number.
String(StringHeader)
Represents a string.
Seq(SeqHeader)
Represents a sequence of values.
Map(MapHeader)
Represents a map of key-value pairs.
By default the map is backed by a BTreeMap. Enable the preserve_order
feature of serde_lilliput to use OrderMap instead, which preserves
entries in the order they are inserted into the map.
Float(FloatHeader)
Represents a floating-point number.
Bytes(BytesHeader)
Represents a byte array.
Bool(BoolHeader)
Represents a boolean.
Unit(UnitHeader)
Represents a unit value.
Null(NullHeader)
Represents a null value.
Implementations§
Trait Implementations§
Source§impl From<BoolHeader> for Header
impl From<BoolHeader> for Header
Source§fn from(value: BoolHeader) -> Self
fn from(value: BoolHeader) -> Self
Converts to this type from the input type.
Source§impl From<BytesHeader> for Header
impl From<BytesHeader> for Header
Source§fn from(value: BytesHeader) -> Self
fn from(value: BytesHeader) -> Self
Converts to this type from the input type.
Source§impl From<FloatHeader> for Header
impl From<FloatHeader> for Header
Source§fn from(value: FloatHeader) -> Self
fn from(value: FloatHeader) -> Self
Converts to this type from the input type.
Source§impl From<NullHeader> for Header
impl From<NullHeader> for Header
Source§fn from(value: NullHeader) -> Self
fn from(value: NullHeader) -> Self
Converts to this type from the input type.
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 From<UnitHeader> for Header
impl From<UnitHeader> for Header
Source§fn from(value: UnitHeader) -> Self
fn from(value: UnitHeader) -> Self
Converts to this type from the input type.
impl Copy for Header
impl Eq for Header
impl StructuralPartialEq for Header
Auto Trait Implementations§
impl Freeze for Header
impl RefUnwindSafe for Header
impl Send for Header
impl Sync for Header
impl Unpin for Header
impl UnwindSafe for Header
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