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: usizeLength of array
Trait Implementations§
Source§impl Clone for SchemaArray
impl Clone for SchemaArray
Source§fn clone(&self) -> SchemaArray
fn clone(&self) -> SchemaArray
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§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 Packed for SchemaArray
impl Packed for SchemaArray
Source§unsafe fn repr_c_optimization_safe(_version: u32) -> IsPacked
unsafe fn repr_c_optimization_safe(_version: u32) -> IsPacked
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 memory layout of the given protocol version.
Note, the only memory layout existing is that of the most recent version, so
Packed-optimization only works when disk-format is identical to memory version. Read more
Source§impl PartialEq for SchemaArray
impl PartialEq for SchemaArray
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. Read more
Source§impl WithSchema for SchemaArray
impl WithSchema for SchemaArray
impl StructuralPartialEq for SchemaArray
Auto Trait Implementations§
impl Freeze for SchemaArray
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