Struct savefile::SchemaArray
source · pub struct SchemaArray {
pub item_type: Box<Schema>,
pub count: usize,
}
Expand description
An array is serialized by serializing its items one by one, without any padding. The dbg_name is just for diagnostics.
Fields§
§item_type: Box<Schema>
Type of array elements
count: usize
Length of array
Trait Implementations§
source§impl Debug for SchemaArray
impl Debug for SchemaArray
source§impl Deserialize for SchemaArray
impl Deserialize for SchemaArray
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 SchemaArray
impl PartialEq for SchemaArray
source§fn eq(&self, other: &SchemaArray) -> bool
fn eq(&self, other: &SchemaArray) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl ReprC for SchemaArray
impl ReprC for SchemaArray
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 SchemaArray
impl Serialize for SchemaArray
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 SchemaArray
impl WithSchema for SchemaArray
impl StructuralPartialEq for SchemaArray
Auto Trait Implementations§
impl RefUnwindSafe for SchemaArray
impl Send for SchemaArray
impl Sync for SchemaArray
impl Unpin for SchemaArray
impl UnwindSafe for SchemaArray
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