pub struct M2Vec<T: M2Parse> {
pub array: M2Array<T>,
pub data: Vec<T>,
}Expand description
Represents a vector of elements in the M2 file format, along with its array reference.
M2Vec stores both the M2Array reference (count and offset in the file) and the actual data elements.
This is used for fields in M2 structs that point to arrays of data elsewhere in the file.
The data field is populated when parsing, but only the array field is written when serializing,
as the actual data is written separately at the correct offset.
Fields§
§array: M2Array<T>Reference to the array in the file (count and offset)
data: Vec<T>The actual data elements (populated when parsing)
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl<T> Freeze for M2Vec<T>
impl<T> RefUnwindSafe for M2Vec<T>where
T: RefUnwindSafe,
impl<T> Send for M2Vec<T>where
T: Send,
impl<T> Sync for M2Vec<T>where
T: Sync,
impl<T> Unpin for M2Vec<T>where
T: Unpin,
impl<T> UnwindSafe for M2Vec<T>where
T: UnwindSafe,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
Source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
Read this value from the supplied reader. Same as
ReadEndian::read_from_little_endian().