Struct savefile::SchemaEnum
[−]
[src]
pub struct SchemaEnum { pub dbg_name: String, pub variants: Vec<Variant>, }
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]
fn fmt(&self, __arg_0: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more
impl PartialEq for SchemaEnum
[src]
fn eq(&self, __arg_0: &SchemaEnum) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &SchemaEnum) -> bool
[src]
This method tests for !=
.
impl WithSchema for SchemaEnum
[src]
fn schema(_version: u32) -> Schema
[src]
Returns a representation of the schema used by this Serialize implementation for the given version.
impl Serialize for SchemaEnum
[src]
fn serialize(&self, serializer: &mut Serializer) -> Result<(), SavefileError>
[src]
Serialize self into the given serializer.
impl Deserialize for SchemaEnum
[src]
fn deserialize(deserializer: &mut Deserializer) -> Result<Self, SavefileError>
[src]
Deserialize and return an instance of Self from the given deserializer.