Struct physis::index::IndexHashBitfield
source · pub struct IndexHashBitfield { /* private fields */ }
Implementations§
source§impl IndexHashBitfield
impl IndexHashBitfield
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 IndexHashBitfield
impl IndexHashBitfield
sourcepub fn size_or_err(
&self
) -> Result<<B1 as Specifier>::InOut, InvalidBitPattern<<B1 as Specifier>::Bytes>>
pub fn size_or_err( &self ) -> Result<<B1 as Specifier>::InOut, InvalidBitPattern<<B1 as Specifier>::Bytes>>
Returns the value of size.
#Errors
If the returned value contains an invalid bit pattern for size.
sourcepub fn with_size(self, new_val: <B1 as Specifier>::InOut) -> Self
pub fn with_size(self, new_val: <B1 as Specifier>::InOut) -> Self
Returns a copy of the bitfield with the value of size set to the given value.
#Panics
If the given value is out of bounds for size.
sourcepub fn with_size_checked(
self,
new_val: <B1 as Specifier>::InOut
) -> Result<Self, OutOfBounds>
pub fn with_size_checked( self, new_val: <B1 as Specifier>::InOut ) -> Result<Self, OutOfBounds>
Returns a copy of the bitfield with the value of size set to the given value.
#Errors
If the given value is out of bounds for size.
sourcepub fn set_size(&mut self, new_val: <B1 as Specifier>::InOut)
pub fn set_size(&mut self, new_val: <B1 as Specifier>::InOut)
Sets the value of size to the given value.
#Panics
If the given value is out of bounds for size.
sourcepub fn set_size_checked(
&mut self,
new_val: <B1 as Specifier>::InOut
) -> Result<(), OutOfBounds>
pub fn set_size_checked( &mut self, new_val: <B1 as Specifier>::InOut ) -> Result<(), OutOfBounds>
Sets the value of size to the given value.
#Errors
If the given value is out of bounds for size.
sourcepub fn data_file_id(&self) -> <B3 as Specifier>::InOut
pub fn data_file_id(&self) -> <B3 as Specifier>::InOut
Returns the value of data_file_id.
sourcepub fn data_file_id_or_err(
&self
) -> Result<<B3 as Specifier>::InOut, InvalidBitPattern<<B3 as Specifier>::Bytes>>
pub fn data_file_id_or_err( &self ) -> Result<<B3 as Specifier>::InOut, InvalidBitPattern<<B3 as Specifier>::Bytes>>
Returns the value of data_file_id.
#Errors
If the returned value contains an invalid bit pattern for data_file_id.
sourcepub fn with_data_file_id(self, new_val: <B3 as Specifier>::InOut) -> Self
pub fn with_data_file_id(self, new_val: <B3 as Specifier>::InOut) -> Self
Returns a copy of the bitfield with the value of data_file_id set to the given value.
#Panics
If the given value is out of bounds for data_file_id.
sourcepub fn with_data_file_id_checked(
self,
new_val: <B3 as Specifier>::InOut
) -> Result<Self, OutOfBounds>
pub fn with_data_file_id_checked( self, new_val: <B3 as Specifier>::InOut ) -> Result<Self, OutOfBounds>
Returns a copy of the bitfield with the value of data_file_id set to the given value.
#Errors
If the given value is out of bounds for data_file_id.
sourcepub fn set_data_file_id(&mut self, new_val: <B3 as Specifier>::InOut)
pub fn set_data_file_id(&mut self, new_val: <B3 as Specifier>::InOut)
Sets the value of data_file_id to the given value.
#Panics
If the given value is out of bounds for data_file_id.
sourcepub fn set_data_file_id_checked(
&mut self,
new_val: <B3 as Specifier>::InOut
) -> Result<(), OutOfBounds>
pub fn set_data_file_id_checked( &mut self, new_val: <B3 as Specifier>::InOut ) -> Result<(), OutOfBounds>
Sets the value of data_file_id to the given value.
#Errors
If the given value is out of bounds for data_file_id.
sourcepub fn offset_or_err(
&self
) -> Result<<B28 as Specifier>::InOut, InvalidBitPattern<<B28 as Specifier>::Bytes>>
pub fn offset_or_err( &self ) -> Result<<B28 as Specifier>::InOut, InvalidBitPattern<<B28 as Specifier>::Bytes>>
Returns the value of offset.
#Errors
If the returned value contains an invalid bit pattern for offset.
sourcepub fn with_offset(self, new_val: <B28 as Specifier>::InOut) -> Self
pub fn with_offset(self, new_val: <B28 as Specifier>::InOut) -> Self
Returns a copy of the bitfield with the value of offset set to the given value.
#Panics
If the given value is out of bounds for offset.
sourcepub fn with_offset_checked(
self,
new_val: <B28 as Specifier>::InOut
) -> Result<Self, OutOfBounds>
pub fn with_offset_checked( self, new_val: <B28 as Specifier>::InOut ) -> Result<Self, OutOfBounds>
Returns a copy of the bitfield with the value of offset set to the given value.
#Errors
If the given value is out of bounds for offset.
sourcepub fn set_offset(&mut self, new_val: <B28 as Specifier>::InOut)
pub fn set_offset(&mut self, new_val: <B28 as Specifier>::InOut)
Sets the value of offset to the given value.
#Panics
If the given value is out of bounds for offset.
sourcepub fn set_offset_checked(
&mut self,
new_val: <B28 as Specifier>::InOut
) -> Result<(), OutOfBounds>
pub fn set_offset_checked( &mut self, new_val: <B28 as Specifier>::InOut ) -> Result<(), OutOfBounds>
Sets the value of offset to the given value.
#Errors
If the given value is out of bounds for offset.
Trait Implementations§
source§impl BinRead for IndexHashBitfield
impl BinRead for IndexHashBitfield
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>
§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 more§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 more§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 more§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 more§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 more§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 more§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 BinWrite for IndexHashBitfield
impl BinWrite for IndexHashBitfield
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<()>
§fn write_be<W>(&self, writer: &mut W) -> Result<(), Error>
fn write_be<W>(&self, writer: &mut W) -> Result<(), Error>
Self
to the writer assuming big-endian byte order. Read more§fn write_le<W>(&self, writer: &mut W) -> Result<(), Error>
fn write_le<W>(&self, writer: &mut W) -> Result<(), Error>
Self
to the writer assuming little-endian byte order. Read moresource§impl Clone for IndexHashBitfield
impl Clone for IndexHashBitfield
source§fn clone(&self) -> IndexHashBitfield
fn clone(&self) -> IndexHashBitfield
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more