pub struct OpcodePeek { /* private fields */ }Implementations§
Source§impl OpcodePeek
impl OpcodePeek
Source§impl OpcodePeek
impl OpcodePeek
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 OpcodePeek
impl OpcodePeek
Sourcepub fn opcode_or_err(
&self,
) -> Result<<B7 as Specifier>::InOut, InvalidBitPattern<<B7 as Specifier>::Bytes>>
pub fn opcode_or_err( &self, ) -> Result<<B7 as Specifier>::InOut, InvalidBitPattern<<B7 as Specifier>::Bytes>>
Returns the value of opcode.
#Errors
If the returned value contains an invalid bit pattern for opcode.
Sourcepub fn with_opcode(self, new_val: <B7 as Specifier>::InOut) -> Self
pub fn with_opcode(self, new_val: <B7 as Specifier>::InOut) -> Self
Returns a copy of the bitfield with the value of opcode set to the given value.
#Panics
If the given value is out of bounds for opcode.
Sourcepub fn with_opcode_checked(
self,
new_val: <B7 as Specifier>::InOut,
) -> Result<Self, OutOfBounds>
pub fn with_opcode_checked( self, new_val: <B7 as Specifier>::InOut, ) -> Result<Self, OutOfBounds>
Returns a copy of the bitfield with the value of opcode set to the given value.
#Errors
If the given value is out of bounds for opcode.
Sourcepub fn set_opcode(&mut self, new_val: <B7 as Specifier>::InOut)
pub fn set_opcode(&mut self, new_val: <B7 as Specifier>::InOut)
Sets the value of opcode to the given value.
#Panics
If the given value is out of bounds for opcode.
Sourcepub fn set_opcode_checked(
&mut self,
new_val: <B7 as Specifier>::InOut,
) -> Result<(), OutOfBounds>
pub fn set_opcode_checked( &mut self, new_val: <B7 as Specifier>::InOut, ) -> Result<(), OutOfBounds>
Sets the value of opcode to the given value.
#Errors
If the given value is out of bounds for opcode.
Sourcepub fn dummy_or_err(
&self,
) -> Result<<B25 as Specifier>::InOut, InvalidBitPattern<<B25 as Specifier>::Bytes>>
pub fn dummy_or_err( &self, ) -> Result<<B25 as Specifier>::InOut, InvalidBitPattern<<B25 as Specifier>::Bytes>>
Returns the value of dummy.
#Errors
If the returned value contains an invalid bit pattern for dummy.
Sourcepub fn with_dummy(self, new_val: <B25 as Specifier>::InOut) -> Self
pub fn with_dummy(self, new_val: <B25 as Specifier>::InOut) -> Self
Returns a copy of the bitfield with the value of dummy set to the given value.
#Panics
If the given value is out of bounds for dummy.
Sourcepub fn with_dummy_checked(
self,
new_val: <B25 as Specifier>::InOut,
) -> Result<Self, OutOfBounds>
pub fn with_dummy_checked( self, new_val: <B25 as Specifier>::InOut, ) -> Result<Self, OutOfBounds>
Returns a copy of the bitfield with the value of dummy set to the given value.
#Errors
If the given value is out of bounds for dummy.
Sourcepub fn set_dummy(&mut self, new_val: <B25 as Specifier>::InOut)
pub fn set_dummy(&mut self, new_val: <B25 as Specifier>::InOut)
Sets the value of dummy to the given value.
#Panics
If the given value is out of bounds for dummy.
Sourcepub fn set_dummy_checked(
&mut self,
new_val: <B25 as Specifier>::InOut,
) -> Result<(), OutOfBounds>
pub fn set_dummy_checked( &mut self, new_val: <B25 as Specifier>::InOut, ) -> Result<(), OutOfBounds>
Sets the value of dummy to the given value.
#Errors
If the given value is out of bounds for dummy.
Trait Implementations§
Source§impl Clone for OpcodePeek
impl Clone for OpcodePeek
Source§fn clone(&self) -> OpcodePeek
fn clone(&self) -> OpcodePeek
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more