Struct smash_arc::FileDataFlags
source · pub struct FileDataFlags { /* private fields */ }
Implementations§
source§impl FileDataFlags
impl FileDataFlags
source§impl FileDataFlags
impl FileDataFlags
sourcepub const fn into_bytes(self) -> [u8; 4]
pub const fn into_bytes(self) -> [u8; 4]
sourcepub const fn from_bytes(bytes: [u8; 4]) -> Self
pub const fn from_bytes(bytes: [u8; 4]) -> Self
Converts the given bytes directly into the bitfield struct.
source§impl FileDataFlags
impl FileDataFlags
sourcepub fn compressed(&self) -> <bool as Specifier>::InOut
pub fn compressed(&self) -> <bool as Specifier>::InOut
Returns the value of compressed.
sourcepub fn compressed_or_err(
&self
) -> Result<<bool as Specifier>::InOut, InvalidBitPattern<<bool as Specifier>::Bytes>>
pub fn compressed_or_err( &self ) -> Result<<bool as Specifier>::InOut, InvalidBitPattern<<bool as Specifier>::Bytes>>
Returns the value of compressed.
#Errors
If the returned value contains an invalid bit pattern for compressed.
sourcepub fn with_compressed(self, new_val: <bool as Specifier>::InOut) -> Self
pub fn with_compressed(self, new_val: <bool as Specifier>::InOut) -> Self
Returns a copy of the bitfield with the value of compressed set to the given value.
#Panics
If the given value is out of bounds for compressed.
sourcepub fn with_compressed_checked(
self,
new_val: <bool as Specifier>::InOut
) -> Result<Self, OutOfBounds>
pub fn with_compressed_checked( self, new_val: <bool as Specifier>::InOut ) -> Result<Self, OutOfBounds>
Returns a copy of the bitfield with the value of compressed set to the given value.
#Errors
If the given value is out of bounds for compressed.
sourcepub fn set_compressed(&mut self, new_val: <bool as Specifier>::InOut)
pub fn set_compressed(&mut self, new_val: <bool as Specifier>::InOut)
Sets the value of compressed to the given value.
#Panics
If the given value is out of bounds for compressed.
sourcepub fn set_compressed_checked(
&mut self,
new_val: <bool as Specifier>::InOut
) -> Result<(), OutOfBounds>
pub fn set_compressed_checked( &mut self, new_val: <bool as Specifier>::InOut ) -> Result<(), OutOfBounds>
Sets the value of compressed to the given value.
#Errors
If the given value is out of bounds for compressed.
sourcepub fn use_zstd_or_err(
&self
) -> Result<<bool as Specifier>::InOut, InvalidBitPattern<<bool as Specifier>::Bytes>>
pub fn use_zstd_or_err( &self ) -> Result<<bool as Specifier>::InOut, InvalidBitPattern<<bool as Specifier>::Bytes>>
Returns the value of use_zstd.
#Errors
If the returned value contains an invalid bit pattern for use_zstd.
sourcepub fn with_use_zstd(self, new_val: <bool as Specifier>::InOut) -> Self
pub fn with_use_zstd(self, new_val: <bool as Specifier>::InOut) -> Self
Returns a copy of the bitfield with the value of use_zstd set to the given value.
#Panics
If the given value is out of bounds for use_zstd.
sourcepub fn with_use_zstd_checked(
self,
new_val: <bool as Specifier>::InOut
) -> Result<Self, OutOfBounds>
pub fn with_use_zstd_checked( self, new_val: <bool as Specifier>::InOut ) -> Result<Self, OutOfBounds>
Returns a copy of the bitfield with the value of use_zstd set to the given value.
#Errors
If the given value is out of bounds for use_zstd.
sourcepub fn set_use_zstd(&mut self, new_val: <bool as Specifier>::InOut)
pub fn set_use_zstd(&mut self, new_val: <bool as Specifier>::InOut)
Sets the value of use_zstd to the given value.
#Panics
If the given value is out of bounds for use_zstd.
sourcepub fn set_use_zstd_checked(
&mut self,
new_val: <bool as Specifier>::InOut
) -> Result<(), OutOfBounds>
pub fn set_use_zstd_checked( &mut self, new_val: <bool as Specifier>::InOut ) -> Result<(), OutOfBounds>
Sets the value of use_zstd to the given value.
#Errors
If the given value is out of bounds for use_zstd.
sourcepub fn unk_or_err(
&self
) -> Result<<B30 as Specifier>::InOut, InvalidBitPattern<<B30 as Specifier>::Bytes>>
pub fn unk_or_err( &self ) -> Result<<B30 as Specifier>::InOut, InvalidBitPattern<<B30 as Specifier>::Bytes>>
Returns the value of unk.
#Errors
If the returned value contains an invalid bit pattern for unk.
sourcepub fn with_unk(self, new_val: <B30 as Specifier>::InOut) -> Self
pub fn with_unk(self, new_val: <B30 as Specifier>::InOut) -> Self
Returns a copy of the bitfield with the value of unk set to the given value.
#Panics
If the given value is out of bounds for unk.
sourcepub fn with_unk_checked(
self,
new_val: <B30 as Specifier>::InOut
) -> Result<Self, OutOfBounds>
pub fn with_unk_checked( self, new_val: <B30 as Specifier>::InOut ) -> Result<Self, OutOfBounds>
Returns a copy of the bitfield with the value of unk set to the given value.
#Errors
If the given value is out of bounds for unk.
sourcepub fn set_unk(&mut self, new_val: <B30 as Specifier>::InOut)
pub fn set_unk(&mut self, new_val: <B30 as Specifier>::InOut)
Sets the value of unk to the given value.
#Panics
If the given value is out of bounds for unk.
sourcepub fn set_unk_checked(
&mut self,
new_val: <B30 as Specifier>::InOut
) -> Result<(), OutOfBounds>
pub fn set_unk_checked( &mut self, new_val: <B30 as Specifier>::InOut ) -> Result<(), OutOfBounds>
Sets the value of unk to the given value.
#Errors
If the given value is out of bounds for unk.
Trait Implementations§
source§impl BinRead for FileDataFlags
impl BinRead for FileDataFlags
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<R>(reader: &mut R) -> Result<Self, Error>
fn read<R>(reader: &mut R) -> Result<Self, Error>
Self
from the reader using default arguments. Read moresource§fn read_be<R>(reader: &mut R) -> Result<Self, Error>
fn read_be<R>(reader: &mut R) -> Result<Self, Error>
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>
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>
T
from the reader assuming native-endian byte order. Read moresource§fn read_args<R>(reader: &mut R, args: Self::Args<'_>) -> Result<Self, Error>
fn read_args<R>(reader: &mut R, args: Self::Args<'_>) -> Result<Self, Error>
Self
from the reader using the given arguments. 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>
Self
from the reader, assuming big-endian byte order, using the
given arguments. Read moresource§fn read_le_args<R>(reader: &mut R, args: Self::Args<'_>) -> Result<Self, Error>
fn read_le_args<R>(reader: &mut R, args: Self::Args<'_>) -> Result<Self, Error>
Self
from the reader, assuming little-endian byte order, using
the given arguments. Read moresource§impl Clone for FileDataFlags
impl Clone for FileDataFlags
source§fn clone(&self) -> FileDataFlags
fn clone(&self) -> FileDataFlags
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for FileDataFlags
impl Debug for FileDataFlags
source§impl Hash for FileDataFlags
impl Hash for FileDataFlags
source§impl PartialEq for FileDataFlags
impl PartialEq for FileDataFlags
source§fn eq(&self, other: &FileDataFlags) -> bool
fn eq(&self, other: &FileDataFlags) -> bool
self
and other
values to be equal, and is used
by ==
.