Struct savefile::SchemaEnum
source · pub struct SchemaEnum {
pub dbg_name: String,
pub variants: Vec<Variant>,
}
Expand description
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
Diagnostic name
variants: Vec<Variant>
Variants of enum
Trait Implementations§
source§impl Debug for SchemaEnum
impl Debug for SchemaEnum
source§impl Deserialize for SchemaEnum
impl Deserialize for SchemaEnum
source§fn deserialize(
deserializer: &mut Deserializer<'_>
) -> Result<Self, SavefileError>
fn deserialize( deserializer: &mut Deserializer<'_> ) -> Result<Self, SavefileError>
Deserialize and return an instance of Self from the given deserializer.
source§impl PartialEq<SchemaEnum> for SchemaEnum
impl PartialEq<SchemaEnum> for SchemaEnum
source§fn eq(&self, other: &SchemaEnum) -> bool
fn eq(&self, other: &SchemaEnum) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl Serialize for SchemaEnum
impl Serialize for SchemaEnum
source§fn serialize(
&self,
serializer: &mut Serializer<'_>
) -> Result<(), SavefileError>
fn serialize( &self, serializer: &mut Serializer<'_> ) -> Result<(), SavefileError>
Serialize self into the given serializer.
source§impl WithSchema for SchemaEnum
impl WithSchema for SchemaEnum
impl StructuralPartialEq for SchemaEnum
Auto Trait Implementations§
impl RefUnwindSafe for SchemaEnum
impl Send for SchemaEnum
impl Sync for SchemaEnum
impl Unpin for SchemaEnum
impl UnwindSafe for SchemaEnum
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