Enum serde_reflection::ContainerFormat [−][src]
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
An empty struct, e.g. struct A
.
A struct with a single unnamed parameter, e.g. struct A(u16)
A struct with several unnamed parameters, e.g. struct A(u16, u32)
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
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Visit all the formats in self
in a depth-first way.
Variables are not supported and will cause an error. Read more
Mutably visit all the formats in self
in a depth-first way. Read more
Update variables and add missing enum variants so that the terms match. This is a special case of term unification: Read more
Whether this format is a variable with no known value yet.
Finalize the formats within self
by removing variables and making sure
that all eligible tuples are compressed into a TupleArray
. Return an error
if any variable has an unknown value. Read more
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
Auto Trait Implementations
impl !RefUnwindSafe for ContainerFormat
impl !Send for ContainerFormat
impl !Sync for ContainerFormat
impl Unpin for ContainerFormat
impl !UnwindSafe for ContainerFormat
Blanket Implementations
Mutably borrows from an owned value. Read more