pub struct BoxReflectionCache { /* private fields */ }Implementations§
Source§impl BoxReflectionCache
impl BoxReflectionCache
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
pub fn as_slice(&self) -> &[BoxReflection]
pub fn as_mut_slice(&mut self) -> &mut [BoxReflection]
pub fn get(&self, index: usize) -> Option<&BoxReflection>
pub fn get_mut(&mut self, index: usize) -> Option<&mut BoxReflection>
pub fn get_at_position(&self, position: Vector3) -> Option<&BoxReflection>
pub fn get_at_position_mut( &mut self, position: Vector3, ) -> Option<&mut BoxReflection>
Source§impl BoxReflectionCache
impl BoxReflectionCache
pub fn from_file<P: AsRef<Path>>(path: P) -> Result<Self, BoxReflectionError>
pub fn from_memory(data: &[u8]) -> Result<Self, BoxReflectionError>
pub fn pack_to_vec(&self) -> Result<Vec<u8>, BoxReflectionError>
pub fn pack_to_file<P: AsRef<Path>>( &self, path: P, ) -> Result<(), BoxReflectionError>
pub fn push(&mut self, br: BoxReflection)
pub fn insert(&mut self, index: usize, br: BoxReflection)
pub fn remove(&mut self, index: usize) -> BoxReflection
pub fn try_remove(&mut self, index: usize) -> Option<BoxReflection>
pub fn clear(&mut self)
pub fn iter(&self) -> impl Iterator<Item = &BoxReflection>
pub fn iter_mut(&mut self) -> impl Iterator<Item = &mut BoxReflection>
Trait Implementations§
Source§impl BinRead for BoxReflectionCache
impl BinRead for BoxReflectionCache
Source§fn read_options<R: Read + Seek>(
__binrw_generated_var_reader: &mut R,
__binrw_generated_var_endian: Endian,
__binrw_generated_var_arguments: Self::Args<'_>,
) -> BinResult<Self>
fn read_options<R: Read + Seek>( __binrw_generated_var_reader: &mut R, __binrw_generated_var_endian: Endian, __binrw_generated_var_arguments: Self::Args<'_>, ) -> BinResult<Self>
Source§fn read_be<R>(reader: &mut R) -> Result<Self, Error>
fn read_be<R>(reader: &mut R) -> Result<Self, Error>
Read
Self from the reader using default arguments and assuming
big-endian byte order. Read moreSource§fn read_le<R>(reader: &mut R) -> Result<Self, Error>
fn read_le<R>(reader: &mut R) -> Result<Self, Error>
Read
Self from the reader using default arguments and assuming
little-endian byte order. Read moreSource§fn read_ne<R>(reader: &mut R) -> Result<Self, Error>
fn read_ne<R>(reader: &mut R) -> Result<Self, Error>
Read
T from the reader assuming native-endian byte order. Read moreSource§fn read_be_args<R>(reader: &mut R, args: Self::Args<'_>) -> Result<Self, Error>
fn read_be_args<R>(reader: &mut R, args: Self::Args<'_>) -> Result<Self, Error>
Read
Self from the reader, assuming big-endian byte order, using the
given arguments. Read moreSource§impl BinWrite for BoxReflectionCache
impl BinWrite for BoxReflectionCache
Source§fn write_options<W: Write + Seek>(
&self,
__binrw_generated_var_writer: &mut W,
__binrw_generated_var_endian: Endian,
__binrw_generated_var_arguments: Self::Args<'_>,
) -> BinResult<()>
fn write_options<W: Write + Seek>( &self, __binrw_generated_var_writer: &mut W, __binrw_generated_var_endian: Endian, __binrw_generated_var_arguments: Self::Args<'_>, ) -> BinResult<()>
Source§fn write_be<W>(&self, writer: &mut W) -> Result<(), Error>
fn write_be<W>(&self, writer: &mut W) -> Result<(), Error>
Write
Self to the writer assuming big-endian byte order. Read moreSource§fn write_le<W>(&self, writer: &mut W) -> Result<(), Error>
fn write_le<W>(&self, writer: &mut W) -> Result<(), Error>
Write
Self to the writer assuming little-endian byte order. Read moreSource§fn write_ne<W>(&self, writer: &mut W) -> Result<(), Error>
fn write_ne<W>(&self, writer: &mut W) -> Result<(), Error>
Write
Self to the writer assuming native-endian byte order. Read moreSource§fn write_be_args<W>(
&self,
writer: &mut W,
args: Self::Args<'_>,
) -> Result<(), Error>
fn write_be_args<W>( &self, writer: &mut W, args: Self::Args<'_>, ) -> Result<(), Error>
Write
Self to the writer, assuming big-endian byte order, using the
given arguments. Read moreSource§impl Clone for BoxReflectionCache
impl Clone for BoxReflectionCache
Source§fn clone(&self) -> BoxReflectionCache
fn clone(&self) -> BoxReflectionCache
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 BoxReflectionCache
impl Debug for BoxReflectionCache
Source§impl Default for BoxReflectionCache
impl Default for BoxReflectionCache
Source§fn default() -> BoxReflectionCache
fn default() -> BoxReflectionCache
Returns the “default value” for a type. Read more
Source§impl<'a> FromIterator<&'a BoxReflection> for BoxReflectionCachewhere
BoxReflection: Clone,
impl<'a> FromIterator<&'a BoxReflection> for BoxReflectionCachewhere
BoxReflection: Clone,
Source§fn from_iter<T: IntoIterator<Item = &'a BoxReflection>>(iter: T) -> Self
fn from_iter<T: IntoIterator<Item = &'a BoxReflection>>(iter: T) -> Self
Creates a value from an iterator. Read more
Source§impl FromIterator<BoxReflection> for BoxReflectionCache
impl FromIterator<BoxReflection> for BoxReflectionCache
Source§fn from_iter<T: IntoIterator<Item = BoxReflection>>(iter: T) -> Self
fn from_iter<T: IntoIterator<Item = BoxReflection>>(iter: T) -> Self
Creates a value from an iterator. Read more
Source§impl GlacierResource for BoxReflectionCache
impl GlacierResource for BoxReflectionCache
type Output = BoxReflectionCache
fn process_data<R: AsRef<[u8]>>( _: WoaVersion, data: R, ) -> Result<Self::Output, GlacierResourceError>
fn serialize(&self, _: WoaVersion) -> Result<Vec<u8>, GlacierResourceError>
fn resource_type() -> [u8; 4]
fn video_memory_requirement(&self) -> u64
fn system_memory_requirement(&self) -> u64
fn should_scramble(&self) -> bool
fn should_compress(&self) -> bool
Source§impl Index<usize> for BoxReflectionCache
impl Index<usize> for BoxReflectionCache
Source§impl IndexMut<usize> for BoxReflectionCache
impl IndexMut<usize> for BoxReflectionCache
Source§impl<'a> IntoIterator for &'a BoxReflectionCache
impl<'a> IntoIterator for &'a BoxReflectionCache
Source§impl<'a> IntoIterator for &'a mut BoxReflectionCache
impl<'a> IntoIterator for &'a mut BoxReflectionCache
Auto Trait Implementations§
impl Freeze for BoxReflectionCache
impl RefUnwindSafe for BoxReflectionCache
impl Send for BoxReflectionCache
impl Sync for BoxReflectionCache
impl Unpin for BoxReflectionCache
impl UnsafeUnpin for BoxReflectionCache
impl UnwindSafe for BoxReflectionCache
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.