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 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for FileDataFlags
Source§impl Debug for FileDataFlags
impl Debug for FileDataFlags
impl Eq 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 ==.