pub enum ContainerFormat {
UnitStruct,
NewTypeStruct(Box<Format>),
TupleStruct(Vec<Format>),
Struct(Vec<Named<Format>>),
Enum(BTreeMap<u32, Named<VariantFormat>>),
}
Expand description
Serde-based serialization format for named “container” types. In Rust, those are enums and structs.
Variants§
UnitStruct
An empty struct, e.g. struct A
.
NewTypeStruct(Box<Format>)
A struct with a single unnamed parameter, e.g. struct A(u16)
TupleStruct(Vec<Format>)
A struct with several unnamed parameters, e.g. struct A(u16, u32)
Struct(Vec<Named<Format>>)
A struct with named parameters, e.g. struct A { a: Foo }
.
Enum(BTreeMap<u32, Named<VariantFormat>>)
An enum, that is, an enumeration of variants. Each variant has a unique name and index within the enum.
Trait Implementations§
Source§impl Debug for ContainerFormat
impl Debug for ContainerFormat
Auto Trait Implementations§
impl Freeze for ContainerFormat
impl RefUnwindSafe for ContainerFormat
impl Send for ContainerFormat
impl Sync for ContainerFormat
impl Unpin for ContainerFormat
impl UnwindSafe for ContainerFormat
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