pub struct SolidStateMedia { /* private fields */ }
Implementations§
Source§impl SolidStateMedia
impl SolidStateMedia
Sourcepub const fn into_bytes(self) -> [u8; 8]
pub const fn into_bytes(self) -> [u8; 8]
Sourcepub const fn from_bytes(bytes: [u8; 8]) -> Self
pub const fn from_bytes(bytes: [u8; 8]) -> Self
Converts the given bytes directly into the bitfield struct.
Source§impl SolidStateMedia
impl SolidStateMedia
Sourcepub fn header(&self) -> <ParameterHeader as Specifier>::InOut
pub fn header(&self) -> <ParameterHeader as Specifier>::InOut
Returns the value of header.
Sourcepub fn header_or_err(
&self,
) -> Result<<ParameterHeader as Specifier>::InOut, InvalidBitPattern<<ParameterHeader as Specifier>::Bytes>>
pub fn header_or_err( &self, ) -> Result<<ParameterHeader as Specifier>::InOut, InvalidBitPattern<<ParameterHeader as Specifier>::Bytes>>
Returns the value of header.
#Errors
If the returned value contains an invalid bit pattern for header.
Sourcepub fn with_header(self, new_val: <ParameterHeader as Specifier>::InOut) -> Self
pub fn with_header(self, new_val: <ParameterHeader as Specifier>::InOut) -> Self
Returns a copy of the bitfield with the value of header set to the given value.
#Panics
If the given value is out of bounds for header.
Sourcepub fn with_header_checked(
self,
new_val: <ParameterHeader as Specifier>::InOut,
) -> Result<Self, OutOfBounds>
pub fn with_header_checked( self, new_val: <ParameterHeader as Specifier>::InOut, ) -> Result<Self, OutOfBounds>
Returns a copy of the bitfield with the value of header set to the given value.
#Errors
If the given value is out of bounds for header.
Sourcepub fn set_header(&mut self, new_val: <ParameterHeader as Specifier>::InOut)
pub fn set_header(&mut self, new_val: <ParameterHeader as Specifier>::InOut)
Sets the value of header to the given value.
#Panics
If the given value is out of bounds for header.
Sourcepub fn set_header_checked(
&mut self,
new_val: <ParameterHeader as Specifier>::InOut,
) -> Result<(), OutOfBounds>
pub fn set_header_checked( &mut self, new_val: <ParameterHeader as Specifier>::InOut, ) -> Result<(), OutOfBounds>
Sets the value of header to the given value.
#Errors
If the given value is out of bounds for header.
Sourcepub fn percentage_used_endurance_indicator(&self) -> <B8 as Specifier>::InOut
pub fn percentage_used_endurance_indicator(&self) -> <B8 as Specifier>::InOut
Returns the value of percentage_used_endurance_indicator.
Sourcepub fn percentage_used_endurance_indicator_or_err(
&self,
) -> Result<<B8 as Specifier>::InOut, InvalidBitPattern<<B8 as Specifier>::Bytes>>
pub fn percentage_used_endurance_indicator_or_err( &self, ) -> Result<<B8 as Specifier>::InOut, InvalidBitPattern<<B8 as Specifier>::Bytes>>
Returns the value of percentage_used_endurance_indicator.
#Errors
If the returned value contains an invalid bit pattern for percentage_used_endurance_indicator.
Sourcepub fn with_percentage_used_endurance_indicator(
self,
new_val: <B8 as Specifier>::InOut,
) -> Self
pub fn with_percentage_used_endurance_indicator( self, new_val: <B8 as Specifier>::InOut, ) -> Self
Returns a copy of the bitfield with the value of percentage_used_endurance_indicator set to the given value.
#Panics
If the given value is out of bounds for percentage_used_endurance_indicator.
Sourcepub fn with_percentage_used_endurance_indicator_checked(
self,
new_val: <B8 as Specifier>::InOut,
) -> Result<Self, OutOfBounds>
pub fn with_percentage_used_endurance_indicator_checked( self, new_val: <B8 as Specifier>::InOut, ) -> Result<Self, OutOfBounds>
Returns a copy of the bitfield with the value of percentage_used_endurance_indicator set to the given value.
#Errors
If the given value is out of bounds for percentage_used_endurance_indicator.
Sourcepub fn set_percentage_used_endurance_indicator(
&mut self,
new_val: <B8 as Specifier>::InOut,
)
pub fn set_percentage_used_endurance_indicator( &mut self, new_val: <B8 as Specifier>::InOut, )
Sets the value of percentage_used_endurance_indicator to the given value.
#Panics
If the given value is out of bounds for percentage_used_endurance_indicator.
Sourcepub fn set_percentage_used_endurance_indicator_checked(
&mut self,
new_val: <B8 as Specifier>::InOut,
) -> Result<(), OutOfBounds>
pub fn set_percentage_used_endurance_indicator_checked( &mut self, new_val: <B8 as Specifier>::InOut, ) -> Result<(), OutOfBounds>
Sets the value of percentage_used_endurance_indicator to the given value.
#Errors
If the given value is out of bounds for percentage_used_endurance_indicator.
Trait Implementations§
Source§impl Clone for SolidStateMedia
impl Clone for SolidStateMedia
Source§fn clone(&self) -> SolidStateMedia
fn clone(&self) -> SolidStateMedia
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more