pub struct QuickDir { /* private fields */ }
Implementations§
source§impl QuickDir
impl QuickDir
sourcepub const fn into_bytes(self) -> [u8; 12]
pub const fn into_bytes(self) -> [u8; 12]
sourcepub const fn from_bytes(bytes: [u8; 12]) -> Self
pub const fn from_bytes(bytes: [u8; 12]) -> Self
Converts the given bytes directly into the bitfield struct.
source§impl QuickDir
impl QuickDir
sourcepub fn hash_or_err(
&self
) -> Result<<u32 as Specifier>::InOut, InvalidBitPattern<<u32 as Specifier>::Bytes>>
pub fn hash_or_err( &self ) -> Result<<u32 as Specifier>::InOut, InvalidBitPattern<<u32 as Specifier>::Bytes>>
Returns the value of hash.
#Errors
If the returned value contains an invalid bit pattern for hash.
sourcepub fn with_hash(self, new_val: <u32 as Specifier>::InOut) -> Self
pub fn with_hash(self, new_val: <u32 as Specifier>::InOut) -> Self
Returns a copy of the bitfield with the value of hash set to the given value.
#Panics
If the given value is out of bounds for hash.
sourcepub fn with_hash_checked(
self,
new_val: <u32 as Specifier>::InOut
) -> Result<Self, OutOfBounds>
pub fn with_hash_checked( self, new_val: <u32 as Specifier>::InOut ) -> Result<Self, OutOfBounds>
Returns a copy of the bitfield with the value of hash set to the given value.
#Errors
If the given value is out of bounds for hash.
sourcepub fn set_hash(&mut self, new_val: <u32 as Specifier>::InOut)
pub fn set_hash(&mut self, new_val: <u32 as Specifier>::InOut)
Sets the value of hash to the given value.
#Panics
If the given value is out of bounds for hash.
sourcepub fn set_hash_checked(
&mut self,
new_val: <u32 as Specifier>::InOut
) -> Result<(), OutOfBounds>
pub fn set_hash_checked( &mut self, new_val: <u32 as Specifier>::InOut ) -> Result<(), OutOfBounds>
Sets the value of hash to the given value.
#Errors
If the given value is out of bounds for hash.
sourcepub fn name_length(&self) -> <u8 as Specifier>::InOut
pub fn name_length(&self) -> <u8 as Specifier>::InOut
Returns the value of name_length.
sourcepub fn name_length_or_err(
&self
) -> Result<<u8 as Specifier>::InOut, InvalidBitPattern<<u8 as Specifier>::Bytes>>
pub fn name_length_or_err( &self ) -> Result<<u8 as Specifier>::InOut, InvalidBitPattern<<u8 as Specifier>::Bytes>>
Returns the value of name_length.
#Errors
If the returned value contains an invalid bit pattern for name_length.
sourcepub fn with_name_length(self, new_val: <u8 as Specifier>::InOut) -> Self
pub fn with_name_length(self, new_val: <u8 as Specifier>::InOut) -> Self
Returns a copy of the bitfield with the value of name_length set to the given value.
#Panics
If the given value is out of bounds for name_length.
sourcepub fn with_name_length_checked(
self,
new_val: <u8 as Specifier>::InOut
) -> Result<Self, OutOfBounds>
pub fn with_name_length_checked( self, new_val: <u8 as Specifier>::InOut ) -> Result<Self, OutOfBounds>
Returns a copy of the bitfield with the value of name_length set to the given value.
#Errors
If the given value is out of bounds for name_length.
sourcepub fn set_name_length(&mut self, new_val: <u8 as Specifier>::InOut)
pub fn set_name_length(&mut self, new_val: <u8 as Specifier>::InOut)
Sets the value of name_length to the given value.
#Panics
If the given value is out of bounds for name_length.
sourcepub fn set_name_length_checked(
&mut self,
new_val: <u8 as Specifier>::InOut
) -> Result<(), OutOfBounds>
pub fn set_name_length_checked( &mut self, new_val: <u8 as Specifier>::InOut ) -> Result<(), OutOfBounds>
Sets the value of name_length to the given value.
#Errors
If the given value is out of bounds for name_length.
sourcepub fn count_or_err(
&self
) -> Result<<B24 as Specifier>::InOut, InvalidBitPattern<<B24 as Specifier>::Bytes>>
pub fn count_or_err( &self ) -> Result<<B24 as Specifier>::InOut, InvalidBitPattern<<B24 as Specifier>::Bytes>>
Returns the value of count.
#Errors
If the returned value contains an invalid bit pattern for count.
sourcepub fn with_count(self, new_val: <B24 as Specifier>::InOut) -> Self
pub fn with_count(self, new_val: <B24 as Specifier>::InOut) -> Self
Returns a copy of the bitfield with the value of count set to the given value.
#Panics
If the given value is out of bounds for count.
sourcepub fn with_count_checked(
self,
new_val: <B24 as Specifier>::InOut
) -> Result<Self, OutOfBounds>
pub fn with_count_checked( self, new_val: <B24 as Specifier>::InOut ) -> Result<Self, OutOfBounds>
Returns a copy of the bitfield with the value of count set to the given value.
#Errors
If the given value is out of bounds for count.
sourcepub fn set_count(&mut self, new_val: <B24 as Specifier>::InOut)
pub fn set_count(&mut self, new_val: <B24 as Specifier>::InOut)
Sets the value of count to the given value.
#Panics
If the given value is out of bounds for count.
sourcepub fn set_count_checked(
&mut self,
new_val: <B24 as Specifier>::InOut
) -> Result<(), OutOfBounds>
pub fn set_count_checked( &mut self, new_val: <B24 as Specifier>::InOut ) -> Result<(), OutOfBounds>
Sets the value of count to the given value.
#Errors
If the given value is out of bounds for count.
sourcepub fn index_or_err(
&self
) -> Result<<u32 as Specifier>::InOut, InvalidBitPattern<<u32 as Specifier>::Bytes>>
pub fn index_or_err( &self ) -> Result<<u32 as Specifier>::InOut, InvalidBitPattern<<u32 as Specifier>::Bytes>>
Returns the value of index.
#Errors
If the returned value contains an invalid bit pattern for index.
sourcepub fn with_index(self, new_val: <u32 as Specifier>::InOut) -> Self
pub fn with_index(self, new_val: <u32 as Specifier>::InOut) -> Self
Returns a copy of the bitfield with the value of index set to the given value.
#Panics
If the given value is out of bounds for index.
sourcepub fn with_index_checked(
self,
new_val: <u32 as Specifier>::InOut
) -> Result<Self, OutOfBounds>
pub fn with_index_checked( self, new_val: <u32 as Specifier>::InOut ) -> Result<Self, OutOfBounds>
Returns a copy of the bitfield with the value of index set to the given value.
#Errors
If the given value is out of bounds for index.
sourcepub fn set_index(&mut self, new_val: <u32 as Specifier>::InOut)
pub fn set_index(&mut self, new_val: <u32 as Specifier>::InOut)
Sets the value of index to the given value.
#Panics
If the given value is out of bounds for index.
sourcepub fn set_index_checked(
&mut self,
new_val: <u32 as Specifier>::InOut
) -> Result<(), OutOfBounds>
pub fn set_index_checked( &mut self, new_val: <u32 as Specifier>::InOut ) -> Result<(), OutOfBounds>
Sets the value of index to the given value.
#Errors
If the given value is out of bounds for index.
Trait Implementations§
source§impl BinRead for QuickDir
impl BinRead for QuickDir
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 more