Struct savefile::SchemaEnum [−][src]
An enum is serialized as its u8 variant discriminator followed by all the field for that variant. The name of each variant, as well as its order in the enum (the discriminator), is significant.
Fields
dbg_name: String
variants: Vec<Variant>
Trait Implementations
impl Debug for SchemaEnum
[src]
impl Debug for SchemaEnum
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl PartialEq for SchemaEnum
[src]
impl PartialEq for SchemaEnum
fn eq(&self, other: &SchemaEnum) -> bool
[src]
fn eq(&self, other: &SchemaEnum) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &SchemaEnum) -> bool
[src]
fn ne(&self, other: &SchemaEnum) -> bool
This method tests for !=
.
impl WithSchema for SchemaEnum
[src]
impl WithSchema for SchemaEnum
fn schema(_version: u32) -> Schema
[src]
fn schema(_version: u32) -> Schema
Returns a representation of the schema used by this Serialize implementation for the given version.
impl Serialize for SchemaEnum
[src]
impl Serialize for SchemaEnum
fn serialize(&self, serializer: &mut Serializer) -> Result<(), SavefileError>
[src]
fn serialize(&self, serializer: &mut Serializer) -> Result<(), SavefileError>
Serialize self into the given serializer.
impl Deserialize for SchemaEnum
[src]
impl Deserialize for SchemaEnum
fn deserialize(deserializer: &mut Deserializer) -> Result<Self, SavefileError>
[src]
fn deserialize(deserializer: &mut Deserializer) -> Result<Self, SavefileError>
Deserialize and return an instance of Self from the given deserializer.
Auto Trait Implementations
impl Send for SchemaEnum
impl Send for SchemaEnum
impl Sync for SchemaEnum
impl Sync for SchemaEnum