pub struct FileInfoFlags { /* private fields */ }
Implementations§
Source§impl FileInfoFlags
impl FileInfoFlags
Source§impl FileInfoFlags
impl FileInfoFlags
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 FileInfoFlags
impl FileInfoFlags
Sourcepub fn unused_or_err(
&self,
) -> Result<<B4 as Specifier>::InOut, InvalidBitPattern<<B4 as Specifier>::Bytes>>
pub fn unused_or_err( &self, ) -> Result<<B4 as Specifier>::InOut, InvalidBitPattern<<B4 as Specifier>::Bytes>>
Returns the value of unused.
#Errors
If the returned value contains an invalid bit pattern for unused.
Sourcepub fn with_unused(self, new_val: <B4 as Specifier>::InOut) -> Self
pub fn with_unused(self, new_val: <B4 as Specifier>::InOut) -> Self
Returns a copy of the bitfield with the value of unused set to the given value.
#Panics
If the given value is out of bounds for unused.
Sourcepub fn with_unused_checked(
self,
new_val: <B4 as Specifier>::InOut,
) -> Result<Self, OutOfBounds>
pub fn with_unused_checked( self, new_val: <B4 as Specifier>::InOut, ) -> Result<Self, OutOfBounds>
Returns a copy of the bitfield with the value of unused set to the given value.
#Errors
If the given value is out of bounds for unused.
Sourcepub fn set_unused(&mut self, new_val: <B4 as Specifier>::InOut)
pub fn set_unused(&mut self, new_val: <B4 as Specifier>::InOut)
Sets the value of unused to the given value.
#Panics
If the given value is out of bounds for unused.
Sourcepub fn set_unused_checked(
&mut self,
new_val: <B4 as Specifier>::InOut,
) -> Result<(), OutOfBounds>
pub fn set_unused_checked( &mut self, new_val: <B4 as Specifier>::InOut, ) -> Result<(), OutOfBounds>
Sets the value of unused to the given value.
#Errors
If the given value is out of bounds for unused.
Sourcepub fn is_redirect(&self) -> <bool as Specifier>::InOut
pub fn is_redirect(&self) -> <bool as Specifier>::InOut
Returns the value of is_redirect.
Sourcepub fn is_redirect_or_err(
&self,
) -> Result<<bool as Specifier>::InOut, InvalidBitPattern<<bool as Specifier>::Bytes>>
pub fn is_redirect_or_err( &self, ) -> Result<<bool as Specifier>::InOut, InvalidBitPattern<<bool as Specifier>::Bytes>>
Returns the value of is_redirect.
#Errors
If the returned value contains an invalid bit pattern for is_redirect.
Sourcepub fn with_is_redirect(self, new_val: <bool as Specifier>::InOut) -> Self
pub fn with_is_redirect(self, new_val: <bool as Specifier>::InOut) -> Self
Returns a copy of the bitfield with the value of is_redirect set to the given value.
#Panics
If the given value is out of bounds for is_redirect.
Sourcepub fn with_is_redirect_checked(
self,
new_val: <bool as Specifier>::InOut,
) -> Result<Self, OutOfBounds>
pub fn with_is_redirect_checked( self, new_val: <bool as Specifier>::InOut, ) -> Result<Self, OutOfBounds>
Returns a copy of the bitfield with the value of is_redirect set to the given value.
#Errors
If the given value is out of bounds for is_redirect.
Sourcepub fn set_is_redirect(&mut self, new_val: <bool as Specifier>::InOut)
pub fn set_is_redirect(&mut self, new_val: <bool as Specifier>::InOut)
Sets the value of is_redirect to the given value.
#Panics
If the given value is out of bounds for is_redirect.
Sourcepub fn set_is_redirect_checked(
&mut self,
new_val: <bool as Specifier>::InOut,
) -> Result<(), OutOfBounds>
pub fn set_is_redirect_checked( &mut self, new_val: <bool as Specifier>::InOut, ) -> Result<(), OutOfBounds>
Sets the value of is_redirect to the given value.
#Errors
If the given value is out of bounds for is_redirect.
Sourcepub fn unused2_or_err(
&self,
) -> Result<<B7 as Specifier>::InOut, InvalidBitPattern<<B7 as Specifier>::Bytes>>
pub fn unused2_or_err( &self, ) -> Result<<B7 as Specifier>::InOut, InvalidBitPattern<<B7 as Specifier>::Bytes>>
Returns the value of unused2.
#Errors
If the returned value contains an invalid bit pattern for unused2.
Sourcepub fn with_unused2(self, new_val: <B7 as Specifier>::InOut) -> Self
pub fn with_unused2(self, new_val: <B7 as Specifier>::InOut) -> Self
Returns a copy of the bitfield with the value of unused2 set to the given value.
#Panics
If the given value is out of bounds for unused2.
Sourcepub fn with_unused2_checked(
self,
new_val: <B7 as Specifier>::InOut,
) -> Result<Self, OutOfBounds>
pub fn with_unused2_checked( self, new_val: <B7 as Specifier>::InOut, ) -> Result<Self, OutOfBounds>
Returns a copy of the bitfield with the value of unused2 set to the given value.
#Errors
If the given value is out of bounds for unused2.
Sourcepub fn set_unused2(&mut self, new_val: <B7 as Specifier>::InOut)
pub fn set_unused2(&mut self, new_val: <B7 as Specifier>::InOut)
Sets the value of unused2 to the given value.
#Panics
If the given value is out of bounds for unused2.
Sourcepub fn set_unused2_checked(
&mut self,
new_val: <B7 as Specifier>::InOut,
) -> Result<(), OutOfBounds>
pub fn set_unused2_checked( &mut self, new_val: <B7 as Specifier>::InOut, ) -> Result<(), OutOfBounds>
Sets the value of unused2 to the given value.
#Errors
If the given value is out of bounds for unused2.
Sourcepub fn unknown1_or_err(
&self,
) -> Result<<bool as Specifier>::InOut, InvalidBitPattern<<bool as Specifier>::Bytes>>
pub fn unknown1_or_err( &self, ) -> Result<<bool as Specifier>::InOut, InvalidBitPattern<<bool as Specifier>::Bytes>>
Returns the value of unknown1.
#Errors
If the returned value contains an invalid bit pattern for unknown1.
Sourcepub fn with_unknown1(self, new_val: <bool as Specifier>::InOut) -> Self
pub fn with_unknown1(self, new_val: <bool as Specifier>::InOut) -> Self
Returns a copy of the bitfield with the value of unknown1 set to the given value.
#Panics
If the given value is out of bounds for unknown1.
Sourcepub fn with_unknown1_checked(
self,
new_val: <bool as Specifier>::InOut,
) -> Result<Self, OutOfBounds>
pub fn with_unknown1_checked( self, new_val: <bool as Specifier>::InOut, ) -> Result<Self, OutOfBounds>
Returns a copy of the bitfield with the value of unknown1 set to the given value.
#Errors
If the given value is out of bounds for unknown1.
Sourcepub fn set_unknown1(&mut self, new_val: <bool as Specifier>::InOut)
pub fn set_unknown1(&mut self, new_val: <bool as Specifier>::InOut)
Sets the value of unknown1 to the given value.
#Panics
If the given value is out of bounds for unknown1.
Sourcepub fn set_unknown1_checked(
&mut self,
new_val: <bool as Specifier>::InOut,
) -> Result<(), OutOfBounds>
pub fn set_unknown1_checked( &mut self, new_val: <bool as Specifier>::InOut, ) -> Result<(), OutOfBounds>
Sets the value of unknown1 to the given value.
#Errors
If the given value is out of bounds for unknown1.
Sourcepub fn padding3_or_err(
&self,
) -> Result<<B2 as Specifier>::InOut, InvalidBitPattern<<B2 as Specifier>::Bytes>>
pub fn padding3_or_err( &self, ) -> Result<<B2 as Specifier>::InOut, InvalidBitPattern<<B2 as Specifier>::Bytes>>
Returns the value of padding3.
#Errors
If the returned value contains an invalid bit pattern for padding3.
Sourcepub fn with_padding3(self, new_val: <B2 as Specifier>::InOut) -> Self
pub fn with_padding3(self, new_val: <B2 as Specifier>::InOut) -> Self
Returns a copy of the bitfield with the value of padding3 set to the given value.
#Panics
If the given value is out of bounds for padding3.
Sourcepub fn with_padding3_checked(
self,
new_val: <B2 as Specifier>::InOut,
) -> Result<Self, OutOfBounds>
pub fn with_padding3_checked( self, new_val: <B2 as Specifier>::InOut, ) -> Result<Self, OutOfBounds>
Returns a copy of the bitfield with the value of padding3 set to the given value.
#Errors
If the given value is out of bounds for padding3.
Sourcepub fn set_padding3(&mut self, new_val: <B2 as Specifier>::InOut)
pub fn set_padding3(&mut self, new_val: <B2 as Specifier>::InOut)
Sets the value of padding3 to the given value.
#Panics
If the given value is out of bounds for padding3.
Sourcepub fn set_padding3_checked(
&mut self,
new_val: <B2 as Specifier>::InOut,
) -> Result<(), OutOfBounds>
pub fn set_padding3_checked( &mut self, new_val: <B2 as Specifier>::InOut, ) -> Result<(), OutOfBounds>
Sets the value of padding3 to the given value.
#Errors
If the given value is out of bounds for padding3.
Sourcepub fn is_regional(&self) -> <bool as Specifier>::InOut
pub fn is_regional(&self) -> <bool as Specifier>::InOut
Returns the value of is_regional.
Sourcepub fn is_regional_or_err(
&self,
) -> Result<<bool as Specifier>::InOut, InvalidBitPattern<<bool as Specifier>::Bytes>>
pub fn is_regional_or_err( &self, ) -> Result<<bool as Specifier>::InOut, InvalidBitPattern<<bool as Specifier>::Bytes>>
Returns the value of is_regional.
#Errors
If the returned value contains an invalid bit pattern for is_regional.
Sourcepub fn with_is_regional(self, new_val: <bool as Specifier>::InOut) -> Self
pub fn with_is_regional(self, new_val: <bool as Specifier>::InOut) -> Self
Returns a copy of the bitfield with the value of is_regional set to the given value.
#Panics
If the given value is out of bounds for is_regional.
Sourcepub fn with_is_regional_checked(
self,
new_val: <bool as Specifier>::InOut,
) -> Result<Self, OutOfBounds>
pub fn with_is_regional_checked( self, new_val: <bool as Specifier>::InOut, ) -> Result<Self, OutOfBounds>
Returns a copy of the bitfield with the value of is_regional set to the given value.
#Errors
If the given value is out of bounds for is_regional.
Sourcepub fn set_is_regional(&mut self, new_val: <bool as Specifier>::InOut)
pub fn set_is_regional(&mut self, new_val: <bool as Specifier>::InOut)
Sets the value of is_regional to the given value.
#Panics
If the given value is out of bounds for is_regional.
Sourcepub fn set_is_regional_checked(
&mut self,
new_val: <bool as Specifier>::InOut,
) -> Result<(), OutOfBounds>
pub fn set_is_regional_checked( &mut self, new_val: <bool as Specifier>::InOut, ) -> Result<(), OutOfBounds>
Sets the value of is_regional to the given value.
#Errors
If the given value is out of bounds for is_regional.
Sourcepub fn is_localized(&self) -> <bool as Specifier>::InOut
pub fn is_localized(&self) -> <bool as Specifier>::InOut
Returns the value of is_localized.
Sourcepub fn is_localized_or_err(
&self,
) -> Result<<bool as Specifier>::InOut, InvalidBitPattern<<bool as Specifier>::Bytes>>
pub fn is_localized_or_err( &self, ) -> Result<<bool as Specifier>::InOut, InvalidBitPattern<<bool as Specifier>::Bytes>>
Returns the value of is_localized.
#Errors
If the returned value contains an invalid bit pattern for is_localized.
Sourcepub fn with_is_localized(self, new_val: <bool as Specifier>::InOut) -> Self
pub fn with_is_localized(self, new_val: <bool as Specifier>::InOut) -> Self
Returns a copy of the bitfield with the value of is_localized set to the given value.
#Panics
If the given value is out of bounds for is_localized.
Sourcepub fn with_is_localized_checked(
self,
new_val: <bool as Specifier>::InOut,
) -> Result<Self, OutOfBounds>
pub fn with_is_localized_checked( self, new_val: <bool as Specifier>::InOut, ) -> Result<Self, OutOfBounds>
Returns a copy of the bitfield with the value of is_localized set to the given value.
#Errors
If the given value is out of bounds for is_localized.
Sourcepub fn set_is_localized(&mut self, new_val: <bool as Specifier>::InOut)
pub fn set_is_localized(&mut self, new_val: <bool as Specifier>::InOut)
Sets the value of is_localized to the given value.
#Panics
If the given value is out of bounds for is_localized.
Sourcepub fn set_is_localized_checked(
&mut self,
new_val: <bool as Specifier>::InOut,
) -> Result<(), OutOfBounds>
pub fn set_is_localized_checked( &mut self, new_val: <bool as Specifier>::InOut, ) -> Result<(), OutOfBounds>
Sets the value of is_localized to the given value.
#Errors
If the given value is out of bounds for is_localized.
Sourcepub fn unused3_or_err(
&self,
) -> Result<<B3 as Specifier>::InOut, InvalidBitPattern<<B3 as Specifier>::Bytes>>
pub fn unused3_or_err( &self, ) -> Result<<B3 as Specifier>::InOut, InvalidBitPattern<<B3 as Specifier>::Bytes>>
Returns the value of unused3.
#Errors
If the returned value contains an invalid bit pattern for unused3.
Sourcepub fn with_unused3(self, new_val: <B3 as Specifier>::InOut) -> Self
pub fn with_unused3(self, new_val: <B3 as Specifier>::InOut) -> Self
Returns a copy of the bitfield with the value of unused3 set to the given value.
#Panics
If the given value is out of bounds for unused3.
Sourcepub fn with_unused3_checked(
self,
new_val: <B3 as Specifier>::InOut,
) -> Result<Self, OutOfBounds>
pub fn with_unused3_checked( self, new_val: <B3 as Specifier>::InOut, ) -> Result<Self, OutOfBounds>
Returns a copy of the bitfield with the value of unused3 set to the given value.
#Errors
If the given value is out of bounds for unused3.
Sourcepub fn set_unused3(&mut self, new_val: <B3 as Specifier>::InOut)
pub fn set_unused3(&mut self, new_val: <B3 as Specifier>::InOut)
Sets the value of unused3 to the given value.
#Panics
If the given value is out of bounds for unused3.
Sourcepub fn set_unused3_checked(
&mut self,
new_val: <B3 as Specifier>::InOut,
) -> Result<(), OutOfBounds>
pub fn set_unused3_checked( &mut self, new_val: <B3 as Specifier>::InOut, ) -> Result<(), OutOfBounds>
Sets the value of unused3 to the given value.
#Errors
If the given value is out of bounds for unused3.
Sourcepub fn unknown2_or_err(
&self,
) -> Result<<bool as Specifier>::InOut, InvalidBitPattern<<bool as Specifier>::Bytes>>
pub fn unknown2_or_err( &self, ) -> Result<<bool as Specifier>::InOut, InvalidBitPattern<<bool as Specifier>::Bytes>>
Returns the value of unknown2.
#Errors
If the returned value contains an invalid bit pattern for unknown2.
Sourcepub fn with_unknown2(self, new_val: <bool as Specifier>::InOut) -> Self
pub fn with_unknown2(self, new_val: <bool as Specifier>::InOut) -> Self
Returns a copy of the bitfield with the value of unknown2 set to the given value.
#Panics
If the given value is out of bounds for unknown2.
Sourcepub fn with_unknown2_checked(
self,
new_val: <bool as Specifier>::InOut,
) -> Result<Self, OutOfBounds>
pub fn with_unknown2_checked( self, new_val: <bool as Specifier>::InOut, ) -> Result<Self, OutOfBounds>
Returns a copy of the bitfield with the value of unknown2 set to the given value.
#Errors
If the given value is out of bounds for unknown2.
Sourcepub fn set_unknown2(&mut self, new_val: <bool as Specifier>::InOut)
pub fn set_unknown2(&mut self, new_val: <bool as Specifier>::InOut)
Sets the value of unknown2 to the given value.
#Panics
If the given value is out of bounds for unknown2.
Sourcepub fn set_unknown2_checked(
&mut self,
new_val: <bool as Specifier>::InOut,
) -> Result<(), OutOfBounds>
pub fn set_unknown2_checked( &mut self, new_val: <bool as Specifier>::InOut, ) -> Result<(), OutOfBounds>
Sets the value of unknown2 to the given value.
#Errors
If the given value is out of bounds for unknown2.
Sourcepub fn unknown3_or_err(
&self,
) -> Result<<bool as Specifier>::InOut, InvalidBitPattern<<bool as Specifier>::Bytes>>
pub fn unknown3_or_err( &self, ) -> Result<<bool as Specifier>::InOut, InvalidBitPattern<<bool as Specifier>::Bytes>>
Returns the value of unknown3.
#Errors
If the returned value contains an invalid bit pattern for unknown3.
Sourcepub fn with_unknown3(self, new_val: <bool as Specifier>::InOut) -> Self
pub fn with_unknown3(self, new_val: <bool as Specifier>::InOut) -> Self
Returns a copy of the bitfield with the value of unknown3 set to the given value.
#Panics
If the given value is out of bounds for unknown3.
Sourcepub fn with_unknown3_checked(
self,
new_val: <bool as Specifier>::InOut,
) -> Result<Self, OutOfBounds>
pub fn with_unknown3_checked( self, new_val: <bool as Specifier>::InOut, ) -> Result<Self, OutOfBounds>
Returns a copy of the bitfield with the value of unknown3 set to the given value.
#Errors
If the given value is out of bounds for unknown3.
Sourcepub fn set_unknown3(&mut self, new_val: <bool as Specifier>::InOut)
pub fn set_unknown3(&mut self, new_val: <bool as Specifier>::InOut)
Sets the value of unknown3 to the given value.
#Panics
If the given value is out of bounds for unknown3.
Sourcepub fn set_unknown3_checked(
&mut self,
new_val: <bool as Specifier>::InOut,
) -> Result<(), OutOfBounds>
pub fn set_unknown3_checked( &mut self, new_val: <bool as Specifier>::InOut, ) -> Result<(), OutOfBounds>
Sets the value of unknown3 to the given value.
#Errors
If the given value is out of bounds for unknown3.
Sourcepub fn unused4_or_err(
&self,
) -> Result<<B10 as Specifier>::InOut, InvalidBitPattern<<B10 as Specifier>::Bytes>>
pub fn unused4_or_err( &self, ) -> Result<<B10 as Specifier>::InOut, InvalidBitPattern<<B10 as Specifier>::Bytes>>
Returns the value of unused4.
#Errors
If the returned value contains an invalid bit pattern for unused4.
Sourcepub fn with_unused4(self, new_val: <B10 as Specifier>::InOut) -> Self
pub fn with_unused4(self, new_val: <B10 as Specifier>::InOut) -> Self
Returns a copy of the bitfield with the value of unused4 set to the given value.
#Panics
If the given value is out of bounds for unused4.
Sourcepub fn with_unused4_checked(
self,
new_val: <B10 as Specifier>::InOut,
) -> Result<Self, OutOfBounds>
pub fn with_unused4_checked( self, new_val: <B10 as Specifier>::InOut, ) -> Result<Self, OutOfBounds>
Returns a copy of the bitfield with the value of unused4 set to the given value.
#Errors
If the given value is out of bounds for unused4.
Sourcepub fn set_unused4(&mut self, new_val: <B10 as Specifier>::InOut)
pub fn set_unused4(&mut self, new_val: <B10 as Specifier>::InOut)
Sets the value of unused4 to the given value.
#Panics
If the given value is out of bounds for unused4.
Sourcepub fn set_unused4_checked(
&mut self,
new_val: <B10 as Specifier>::InOut,
) -> Result<(), OutOfBounds>
pub fn set_unused4_checked( &mut self, new_val: <B10 as Specifier>::InOut, ) -> Result<(), OutOfBounds>
Sets the value of unused4 to the given value.
#Errors
If the given value is out of bounds for unused4.
Trait Implementations§
Source§impl BinRead for FileInfoFlags
impl BinRead for FileInfoFlags
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 FileInfoFlags
impl Clone for FileInfoFlags
Source§fn clone(&self) -> FileInfoFlags
fn clone(&self) -> FileInfoFlags
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more