pub struct ExtendedHeader { /* private fields */ }Implementations§
Source§impl ExtendedHeader
impl ExtendedHeader
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 ExtendedHeader
impl ExtendedHeader
Sourcepub fn attribute_or_err(
&self,
) -> Result<<B15 as Specifier>::InOut, InvalidBitPattern<<B15 as Specifier>::Bytes>>
pub fn attribute_or_err( &self, ) -> Result<<B15 as Specifier>::InOut, InvalidBitPattern<<B15 as Specifier>::Bytes>>
Returns the value of attribute.
§Errors
If the returned value contains an invalid bit pattern for attribute.
Sourcepub fn with_attribute(self, new_val: <B15 as Specifier>::InOut) -> Self
pub fn with_attribute(self, new_val: <B15 as Specifier>::InOut) -> Self
Returns a copy of the bitfield with the value of attribute set to the given value.
§Panics
If the given value is out of bounds for attribute.
Sourcepub fn with_attribute_checked(
self,
new_val: <B15 as Specifier>::InOut,
) -> Result<Self, OutOfBounds>
pub fn with_attribute_checked( self, new_val: <B15 as Specifier>::InOut, ) -> Result<Self, OutOfBounds>
Returns a copy of the bitfield with the value of attribute set to the given value.
§Errors
If the given value is out of bounds for attribute.
Sourcepub fn set_attribute(&mut self, new_val: <B15 as Specifier>::InOut)
pub fn set_attribute(&mut self, new_val: <B15 as Specifier>::InOut)
Sets the value of attribute to the given value.
§Panics
If the given value is out of bounds for attribute.
Sourcepub fn set_attribute_checked(
&mut self,
new_val: <B15 as Specifier>::InOut,
) -> Result<(), OutOfBounds>
pub fn set_attribute_checked( &mut self, new_val: <B15 as Specifier>::InOut, ) -> Result<(), OutOfBounds>
Sets the value of attribute to the given value.
§Errors
If the given value is out of bounds for attribute.
Sourcepub fn next_or_err(
&self,
) -> Result<<bool as Specifier>::InOut, InvalidBitPattern<<bool as Specifier>::Bytes>>
pub fn next_or_err( &self, ) -> Result<<bool as Specifier>::InOut, InvalidBitPattern<<bool as Specifier>::Bytes>>
Sourcepub fn with_next(self, new_val: <bool as Specifier>::InOut) -> Self
pub fn with_next(self, new_val: <bool as Specifier>::InOut) -> Self
Returns a copy of the bitfield with the value of next set to the given value.
§Panics
If the given value is out of bounds for next.
Sourcepub fn with_next_checked(
self,
new_val: <bool as Specifier>::InOut,
) -> Result<Self, OutOfBounds>
pub fn with_next_checked( self, new_val: <bool as Specifier>::InOut, ) -> Result<Self, OutOfBounds>
Returns a copy of the bitfield with the value of next set to the given value.
§Errors
If the given value is out of bounds for next.
Sourcepub fn set_next_checked(
&mut self,
new_val: <bool as Specifier>::InOut,
) -> Result<(), OutOfBounds>
pub fn set_next_checked( &mut self, new_val: <bool as Specifier>::InOut, ) -> Result<(), OutOfBounds>
Sourcepub fn chunk_or_err(
&self,
) -> Result<<B6 as Specifier>::InOut, InvalidBitPattern<<B6 as Specifier>::Bytes>>
pub fn chunk_or_err( &self, ) -> Result<<B6 as Specifier>::InOut, InvalidBitPattern<<B6 as Specifier>::Bytes>>
Returns the value of chunk.
§Errors
If the returned value contains an invalid bit pattern for chunk.
Sourcepub fn with_chunk(self, new_val: <B6 as Specifier>::InOut) -> Self
pub fn with_chunk(self, new_val: <B6 as Specifier>::InOut) -> Self
Returns a copy of the bitfield with the value of chunk set to the given value.
§Panics
If the given value is out of bounds for chunk.
Sourcepub fn with_chunk_checked(
self,
new_val: <B6 as Specifier>::InOut,
) -> Result<Self, OutOfBounds>
pub fn with_chunk_checked( self, new_val: <B6 as Specifier>::InOut, ) -> Result<Self, OutOfBounds>
Returns a copy of the bitfield with the value of chunk set to the given value.
§Errors
If the given value is out of bounds for chunk.
Sourcepub fn set_chunk_checked(
&mut self,
new_val: <B6 as Specifier>::InOut,
) -> Result<(), OutOfBounds>
pub fn set_chunk_checked( &mut self, new_val: <B6 as Specifier>::InOut, ) -> Result<(), OutOfBounds>
Sourcepub fn size_or_err(
&self,
) -> Result<<B10 as Specifier>::InOut, InvalidBitPattern<<B10 as Specifier>::Bytes>>
pub fn size_or_err( &self, ) -> Result<<B10 as Specifier>::InOut, InvalidBitPattern<<B10 as Specifier>::Bytes>>
Sourcepub fn with_size(self, new_val: <B10 as Specifier>::InOut) -> Self
pub fn with_size(self, new_val: <B10 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: <B10 as Specifier>::InOut,
) -> Result<Self, OutOfBounds>
pub fn with_size_checked( self, new_val: <B10 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_checked(
&mut self,
new_val: <B10 as Specifier>::InOut,
) -> Result<(), OutOfBounds>
pub fn set_size_checked( &mut self, new_val: <B10 as Specifier>::InOut, ) -> Result<(), OutOfBounds>
Trait Implementations§
Source§impl CheckTotalSizeMultipleOf8 for ExtendedHeader
impl CheckTotalSizeMultipleOf8 for ExtendedHeader
Source§impl Clone for ExtendedHeader
impl Clone for ExtendedHeader
Source§fn clone(&self) -> ExtendedHeader
fn clone(&self) -> ExtendedHeader
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more