Struct savefile::SchemaStruct
source · pub struct SchemaStruct {
pub dbg_name: String,
pub fields: Vec<Field>,
}
Expand description
A struct is serialized by serializing its fields one by one, without any padding. The dbg_name is just for diagnostics.
Fields§
§dbg_name: String
Diagnostic value
fields: Vec<Field>
Fields of struct
Trait Implementations§
source§impl Debug for SchemaStruct
impl Debug for SchemaStruct
source§impl Deserialize for SchemaStruct
impl Deserialize for SchemaStruct
source§fn deserialize(
deserializer: &mut Deserializer<'_, impl Read>
) -> Result<Self, SavefileError>
fn deserialize( deserializer: &mut Deserializer<'_, impl Read> ) -> Result<Self, SavefileError>
Deserialize and return an instance of Self from the given deserializer.
source§impl PartialEq for SchemaStruct
impl PartialEq for SchemaStruct
source§fn eq(&self, other: &SchemaStruct) -> bool
fn eq(&self, other: &SchemaStruct) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl ReprC for SchemaStruct
impl ReprC for SchemaStruct
source§unsafe fn repr_c_optimization_safe(_version: u32) -> IsReprC
unsafe fn repr_c_optimization_safe(_version: u32) -> IsReprC
This method returns true if the optimization is allowed
for the protocol version given as an argument.
This may return true if and only if the given protocol version
has a serialized format identical to the given protocol version. Read more
source§impl Serialize for SchemaStruct
impl Serialize for SchemaStruct
source§fn serialize(
&self,
serializer: &mut Serializer<'_, impl Write>
) -> Result<(), SavefileError>
fn serialize( &self, serializer: &mut Serializer<'_, impl Write> ) -> Result<(), SavefileError>
Serialize self into the given serializer.
In versions prior to 0.15, ‘Serializer’ did not accept a type parameter.
It now requires a type parameter with the type of writer expected.
source§impl WithSchema for SchemaStruct
impl WithSchema for SchemaStruct
impl StructuralPartialEq for SchemaStruct
Auto Trait Implementations§
impl RefUnwindSafe for SchemaStruct
impl Send for SchemaStruct
impl Sync for SchemaStruct
impl Unpin for SchemaStruct
impl UnwindSafe for SchemaStruct
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