pub struct EntryFlag { /* private fields */ }
Implementations§
source§impl EntryFlag
impl EntryFlag
sourcepub const fn into_bytes(self) -> [u8; 2]
pub const fn into_bytes(self) -> [u8; 2]
sourcepub const fn from_bytes(bytes: [u8; 2]) -> Self
pub const fn from_bytes(bytes: [u8; 2]) -> Self
Converts the given bytes directly into the bitfield struct.
source§impl EntryFlag
impl EntryFlag
sourcepub fn draw_model(&self) -> <bool as Specifier>::InOut
pub fn draw_model(&self) -> <bool as Specifier>::InOut
Returns the value of draw_model.
sourcepub fn draw_model_or_err(
&self
) -> Result<<bool as Specifier>::InOut, InvalidBitPattern<<bool as Specifier>::Bytes>>
pub fn draw_model_or_err( &self ) -> Result<<bool as Specifier>::InOut, InvalidBitPattern<<bool as Specifier>::Bytes>>
Returns the value of draw_model.
#Errors
If the returned value contains an invalid bit pattern for draw_model.
sourcepub fn with_draw_model(self, new_val: <bool as Specifier>::InOut) -> Self
pub fn with_draw_model(self, new_val: <bool as Specifier>::InOut) -> Self
Returns a copy of the bitfield with the value of draw_model set to the given value.
#Panics
If the given value is out of bounds for draw_model.
sourcepub fn with_draw_model_checked(
self,
new_val: <bool as Specifier>::InOut
) -> Result<Self, OutOfBounds>
pub fn with_draw_model_checked( self, new_val: <bool as Specifier>::InOut ) -> Result<Self, OutOfBounds>
Returns a copy of the bitfield with the value of draw_model set to the given value.
#Errors
If the given value is out of bounds for draw_model.
sourcepub fn set_draw_model(&mut self, new_val: <bool as Specifier>::InOut)
pub fn set_draw_model(&mut self, new_val: <bool as Specifier>::InOut)
Sets the value of draw_model to the given value.
#Panics
If the given value is out of bounds for draw_model.
sourcepub fn set_draw_model_checked(
&mut self,
new_val: <bool as Specifier>::InOut
) -> Result<(), OutOfBounds>
pub fn set_draw_model_checked( &mut self, new_val: <bool as Specifier>::InOut ) -> Result<(), OutOfBounds>
Sets the value of draw_model to the given value.
#Errors
If the given value is out of bounds for draw_model.
sourcepub fn cast_shadow(&self) -> <bool as Specifier>::InOut
pub fn cast_shadow(&self) -> <bool as Specifier>::InOut
Returns the value of cast_shadow.
sourcepub fn cast_shadow_or_err(
&self
) -> Result<<bool as Specifier>::InOut, InvalidBitPattern<<bool as Specifier>::Bytes>>
pub fn cast_shadow_or_err( &self ) -> Result<<bool as Specifier>::InOut, InvalidBitPattern<<bool as Specifier>::Bytes>>
Returns the value of cast_shadow.
#Errors
If the returned value contains an invalid bit pattern for cast_shadow.
sourcepub fn with_cast_shadow(self, new_val: <bool as Specifier>::InOut) -> Self
pub fn with_cast_shadow(self, new_val: <bool as Specifier>::InOut) -> Self
Returns a copy of the bitfield with the value of cast_shadow set to the given value.
#Panics
If the given value is out of bounds for cast_shadow.
sourcepub fn with_cast_shadow_checked(
self,
new_val: <bool as Specifier>::InOut
) -> Result<Self, OutOfBounds>
pub fn with_cast_shadow_checked( self, new_val: <bool as Specifier>::InOut ) -> Result<Self, OutOfBounds>
Returns a copy of the bitfield with the value of cast_shadow set to the given value.
#Errors
If the given value is out of bounds for cast_shadow.
sourcepub fn set_cast_shadow(&mut self, new_val: <bool as Specifier>::InOut)
pub fn set_cast_shadow(&mut self, new_val: <bool as Specifier>::InOut)
Sets the value of cast_shadow to the given value.
#Panics
If the given value is out of bounds for cast_shadow.
sourcepub fn set_cast_shadow_checked(
&mut self,
new_val: <bool as Specifier>::InOut
) -> Result<(), OutOfBounds>
pub fn set_cast_shadow_checked( &mut self, new_val: <bool as Specifier>::InOut ) -> Result<(), OutOfBounds>
Sets the value of cast_shadow to the given value.
#Errors
If the given value is out of bounds for cast_shadow.
sourcepub fn unk3_or_err(
&self
) -> Result<<bool as Specifier>::InOut, InvalidBitPattern<<bool as Specifier>::Bytes>>
pub fn unk3_or_err( &self ) -> Result<<bool as Specifier>::InOut, InvalidBitPattern<<bool as Specifier>::Bytes>>
Returns the value of unk3.
#Errors
If the returned value contains an invalid bit pattern for unk3.
sourcepub fn with_unk3(self, new_val: <bool as Specifier>::InOut) -> Self
pub fn with_unk3(self, new_val: <bool as Specifier>::InOut) -> Self
Returns a copy of the bitfield with the value of unk3 set to the given value.
#Panics
If the given value is out of bounds for unk3.
sourcepub fn with_unk3_checked(
self,
new_val: <bool as Specifier>::InOut
) -> Result<Self, OutOfBounds>
pub fn with_unk3_checked( self, new_val: <bool as Specifier>::InOut ) -> Result<Self, OutOfBounds>
Returns a copy of the bitfield with the value of unk3 set to the given value.
#Errors
If the given value is out of bounds for unk3.
sourcepub fn set_unk3(&mut self, new_val: <bool as Specifier>::InOut)
pub fn set_unk3(&mut self, new_val: <bool as Specifier>::InOut)
Sets the value of unk3 to the given value.
#Panics
If the given value is out of bounds for unk3.
sourcepub fn set_unk3_checked(
&mut self,
new_val: <bool as Specifier>::InOut
) -> Result<(), OutOfBounds>
pub fn set_unk3_checked( &mut self, new_val: <bool as Specifier>::InOut ) -> Result<(), OutOfBounds>
Sets the value of unk3 to the given value.
#Errors
If the given value is out of bounds for unk3.
sourcepub fn unk4_or_err(
&self
) -> Result<<bool as Specifier>::InOut, InvalidBitPattern<<bool as Specifier>::Bytes>>
pub fn unk4_or_err( &self ) -> Result<<bool as Specifier>::InOut, InvalidBitPattern<<bool as Specifier>::Bytes>>
Returns the value of unk4.
#Errors
If the returned value contains an invalid bit pattern for unk4.
sourcepub fn with_unk4(self, new_val: <bool as Specifier>::InOut) -> Self
pub fn with_unk4(self, new_val: <bool as Specifier>::InOut) -> Self
Returns a copy of the bitfield with the value of unk4 set to the given value.
#Panics
If the given value is out of bounds for unk4.
sourcepub fn with_unk4_checked(
self,
new_val: <bool as Specifier>::InOut
) -> Result<Self, OutOfBounds>
pub fn with_unk4_checked( self, new_val: <bool as Specifier>::InOut ) -> Result<Self, OutOfBounds>
Returns a copy of the bitfield with the value of unk4 set to the given value.
#Errors
If the given value is out of bounds for unk4.
sourcepub fn set_unk4(&mut self, new_val: <bool as Specifier>::InOut)
pub fn set_unk4(&mut self, new_val: <bool as Specifier>::InOut)
Sets the value of unk4 to the given value.
#Panics
If the given value is out of bounds for unk4.
sourcepub fn set_unk4_checked(
&mut self,
new_val: <bool as Specifier>::InOut
) -> Result<(), OutOfBounds>
pub fn set_unk4_checked( &mut self, new_val: <bool as Specifier>::InOut ) -> Result<(), OutOfBounds>
Sets the value of unk4 to the given value.
#Errors
If the given value is out of bounds for unk4.
sourcepub fn unk5_or_err(
&self
) -> Result<<bool as Specifier>::InOut, InvalidBitPattern<<bool as Specifier>::Bytes>>
pub fn unk5_or_err( &self ) -> Result<<bool as Specifier>::InOut, InvalidBitPattern<<bool as Specifier>::Bytes>>
Returns the value of unk5.
#Errors
If the returned value contains an invalid bit pattern for unk5.
sourcepub fn with_unk5(self, new_val: <bool as Specifier>::InOut) -> Self
pub fn with_unk5(self, new_val: <bool as Specifier>::InOut) -> Self
Returns a copy of the bitfield with the value of unk5 set to the given value.
#Panics
If the given value is out of bounds for unk5.
sourcepub fn with_unk5_checked(
self,
new_val: <bool as Specifier>::InOut
) -> Result<Self, OutOfBounds>
pub fn with_unk5_checked( self, new_val: <bool as Specifier>::InOut ) -> Result<Self, OutOfBounds>
Returns a copy of the bitfield with the value of unk5 set to the given value.
#Errors
If the given value is out of bounds for unk5.
sourcepub fn set_unk5(&mut self, new_val: <bool as Specifier>::InOut)
pub fn set_unk5(&mut self, new_val: <bool as Specifier>::InOut)
Sets the value of unk5 to the given value.
#Panics
If the given value is out of bounds for unk5.
sourcepub fn set_unk5_checked(
&mut self,
new_val: <bool as Specifier>::InOut
) -> Result<(), OutOfBounds>
pub fn set_unk5_checked( &mut self, new_val: <bool as Specifier>::InOut ) -> Result<(), OutOfBounds>
Sets the value of unk5 to the given value.
#Errors
If the given value is out of bounds for unk5.
Trait Implementations§
source§impl BinRead for EntryFlag
impl BinRead for EntryFlag
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§impl PartialEq for EntryFlag
impl PartialEq for EntryFlag
source§impl ReadEndian for EntryFlag
impl ReadEndian for EntryFlag
source§const ENDIAN: EndianKind = binrw::meta::EndianKind::None
const ENDIAN: EndianKind = binrw::meta::EndianKind::None
source§impl SsbhWrite for EntryFlag
impl SsbhWrite for EntryFlag
source§fn ssbh_write<W: Write + Seek>(
&self,
writer: &mut W,
data_ptr: &mut u64
) -> Result<()>
fn ssbh_write<W: Write + Seek>( &self, writer: &mut W, data_ptr: &mut u64 ) -> Result<()>
self
to writer
.
data_ptr
is assumed to be the absolute offset where the next data stored behind an offset will be written.
Struct that contains no offsets as fields can skip updating data_ptr
. Read more