pub struct RAType { /* private fields */ }Implementations§
Source§impl RAType
impl RAType
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 RAType
impl RAType
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 rd_or_err(
&self,
) -> Result<<B5 as Specifier>::InOut, InvalidBitPattern<<B5 as Specifier>::Bytes>>
pub fn rd_or_err( &self, ) -> Result<<B5 as Specifier>::InOut, InvalidBitPattern<<B5 as Specifier>::Bytes>>
Returns the value of rd.
#Errors
If the returned value contains an invalid bit pattern for rd.
Sourcepub fn with_rd(self, new_val: <B5 as Specifier>::InOut) -> Self
pub fn with_rd(self, new_val: <B5 as Specifier>::InOut) -> Self
Returns a copy of the bitfield with the value of rd set to the given value.
#Panics
If the given value is out of bounds for rd.
Sourcepub fn with_rd_checked(
self,
new_val: <B5 as Specifier>::InOut,
) -> Result<Self, OutOfBounds>
pub fn with_rd_checked( self, new_val: <B5 as Specifier>::InOut, ) -> Result<Self, OutOfBounds>
Returns a copy of the bitfield with the value of rd set to the given value.
#Errors
If the given value is out of bounds for rd.
Sourcepub fn set_rd(&mut self, new_val: <B5 as Specifier>::InOut)
pub fn set_rd(&mut self, new_val: <B5 as Specifier>::InOut)
Sets the value of rd to the given value.
#Panics
If the given value is out of bounds for rd.
Sourcepub fn set_rd_checked(
&mut self,
new_val: <B5 as Specifier>::InOut,
) -> Result<(), OutOfBounds>
pub fn set_rd_checked( &mut self, new_val: <B5 as Specifier>::InOut, ) -> Result<(), OutOfBounds>
Sets the value of rd to the given value.
#Errors
If the given value is out of bounds for rd.
Sourcepub fn funct3_or_err(
&self,
) -> Result<<B3 as Specifier>::InOut, InvalidBitPattern<<B3 as Specifier>::Bytes>>
pub fn funct3_or_err( &self, ) -> Result<<B3 as Specifier>::InOut, InvalidBitPattern<<B3 as Specifier>::Bytes>>
Returns the value of funct3.
#Errors
If the returned value contains an invalid bit pattern for funct3.
Sourcepub fn with_funct3(self, new_val: <B3 as Specifier>::InOut) -> Self
pub fn with_funct3(self, new_val: <B3 as Specifier>::InOut) -> Self
Returns a copy of the bitfield with the value of funct3 set to the given value.
#Panics
If the given value is out of bounds for funct3.
Sourcepub fn with_funct3_checked(
self,
new_val: <B3 as Specifier>::InOut,
) -> Result<Self, OutOfBounds>
pub fn with_funct3_checked( self, new_val: <B3 as Specifier>::InOut, ) -> Result<Self, OutOfBounds>
Returns a copy of the bitfield with the value of funct3 set to the given value.
#Errors
If the given value is out of bounds for funct3.
Sourcepub fn set_funct3(&mut self, new_val: <B3 as Specifier>::InOut)
pub fn set_funct3(&mut self, new_val: <B3 as Specifier>::InOut)
Sets the value of funct3 to the given value.
#Panics
If the given value is out of bounds for funct3.
Sourcepub fn set_funct3_checked(
&mut self,
new_val: <B3 as Specifier>::InOut,
) -> Result<(), OutOfBounds>
pub fn set_funct3_checked( &mut self, new_val: <B3 as Specifier>::InOut, ) -> Result<(), OutOfBounds>
Sets the value of funct3 to the given value.
#Errors
If the given value is out of bounds for funct3.
Sourcepub fn rs1_or_err(
&self,
) -> Result<<B5 as Specifier>::InOut, InvalidBitPattern<<B5 as Specifier>::Bytes>>
pub fn rs1_or_err( &self, ) -> Result<<B5 as Specifier>::InOut, InvalidBitPattern<<B5 as Specifier>::Bytes>>
Returns the value of rs1.
#Errors
If the returned value contains an invalid bit pattern for rs1.
Sourcepub fn with_rs1(self, new_val: <B5 as Specifier>::InOut) -> Self
pub fn with_rs1(self, new_val: <B5 as Specifier>::InOut) -> Self
Returns a copy of the bitfield with the value of rs1 set to the given value.
#Panics
If the given value is out of bounds for rs1.
Sourcepub fn with_rs1_checked(
self,
new_val: <B5 as Specifier>::InOut,
) -> Result<Self, OutOfBounds>
pub fn with_rs1_checked( self, new_val: <B5 as Specifier>::InOut, ) -> Result<Self, OutOfBounds>
Returns a copy of the bitfield with the value of rs1 set to the given value.
#Errors
If the given value is out of bounds for rs1.
Sourcepub fn set_rs1(&mut self, new_val: <B5 as Specifier>::InOut)
pub fn set_rs1(&mut self, new_val: <B5 as Specifier>::InOut)
Sets the value of rs1 to the given value.
#Panics
If the given value is out of bounds for rs1.
Sourcepub fn set_rs1_checked(
&mut self,
new_val: <B5 as Specifier>::InOut,
) -> Result<(), OutOfBounds>
pub fn set_rs1_checked( &mut self, new_val: <B5 as Specifier>::InOut, ) -> Result<(), OutOfBounds>
Sets the value of rs1 to the given value.
#Errors
If the given value is out of bounds for rs1.
Sourcepub fn rs2_or_err(
&self,
) -> Result<<B5 as Specifier>::InOut, InvalidBitPattern<<B5 as Specifier>::Bytes>>
pub fn rs2_or_err( &self, ) -> Result<<B5 as Specifier>::InOut, InvalidBitPattern<<B5 as Specifier>::Bytes>>
Returns the value of rs2.
#Errors
If the returned value contains an invalid bit pattern for rs2.
Sourcepub fn with_rs2(self, new_val: <B5 as Specifier>::InOut) -> Self
pub fn with_rs2(self, new_val: <B5 as Specifier>::InOut) -> Self
Returns a copy of the bitfield with the value of rs2 set to the given value.
#Panics
If the given value is out of bounds for rs2.
Sourcepub fn with_rs2_checked(
self,
new_val: <B5 as Specifier>::InOut,
) -> Result<Self, OutOfBounds>
pub fn with_rs2_checked( self, new_val: <B5 as Specifier>::InOut, ) -> Result<Self, OutOfBounds>
Returns a copy of the bitfield with the value of rs2 set to the given value.
#Errors
If the given value is out of bounds for rs2.
Sourcepub fn set_rs2(&mut self, new_val: <B5 as Specifier>::InOut)
pub fn set_rs2(&mut self, new_val: <B5 as Specifier>::InOut)
Sets the value of rs2 to the given value.
#Panics
If the given value is out of bounds for rs2.
Sourcepub fn set_rs2_checked(
&mut self,
new_val: <B5 as Specifier>::InOut,
) -> Result<(), OutOfBounds>
pub fn set_rs2_checked( &mut self, new_val: <B5 as Specifier>::InOut, ) -> Result<(), OutOfBounds>
Sets the value of rs2 to the given value.
#Errors
If the given value is out of bounds for rs2.
Sourcepub fn rl_or_err(
&self,
) -> Result<<bool as Specifier>::InOut, InvalidBitPattern<<bool as Specifier>::Bytes>>
pub fn rl_or_err( &self, ) -> Result<<bool as Specifier>::InOut, InvalidBitPattern<<bool as Specifier>::Bytes>>
Returns the value of rl.
#Errors
If the returned value contains an invalid bit pattern for rl.
Sourcepub fn with_rl(self, new_val: <bool as Specifier>::InOut) -> Self
pub fn with_rl(self, new_val: <bool as Specifier>::InOut) -> Self
Returns a copy of the bitfield with the value of rl set to the given value.
#Panics
If the given value is out of bounds for rl.
Sourcepub fn with_rl_checked(
self,
new_val: <bool as Specifier>::InOut,
) -> Result<Self, OutOfBounds>
pub fn with_rl_checked( self, new_val: <bool as Specifier>::InOut, ) -> Result<Self, OutOfBounds>
Returns a copy of the bitfield with the value of rl set to the given value.
#Errors
If the given value is out of bounds for rl.
Sourcepub fn set_rl(&mut self, new_val: <bool as Specifier>::InOut)
pub fn set_rl(&mut self, new_val: <bool as Specifier>::InOut)
Sets the value of rl to the given value.
#Panics
If the given value is out of bounds for rl.
Sourcepub fn set_rl_checked(
&mut self,
new_val: <bool as Specifier>::InOut,
) -> Result<(), OutOfBounds>
pub fn set_rl_checked( &mut self, new_val: <bool as Specifier>::InOut, ) -> Result<(), OutOfBounds>
Sets the value of rl to the given value.
#Errors
If the given value is out of bounds for rl.
Sourcepub fn aq_or_err(
&self,
) -> Result<<bool as Specifier>::InOut, InvalidBitPattern<<bool as Specifier>::Bytes>>
pub fn aq_or_err( &self, ) -> Result<<bool as Specifier>::InOut, InvalidBitPattern<<bool as Specifier>::Bytes>>
Returns the value of aq.
#Errors
If the returned value contains an invalid bit pattern for aq.
Sourcepub fn with_aq(self, new_val: <bool as Specifier>::InOut) -> Self
pub fn with_aq(self, new_val: <bool as Specifier>::InOut) -> Self
Returns a copy of the bitfield with the value of aq set to the given value.
#Panics
If the given value is out of bounds for aq.
Sourcepub fn with_aq_checked(
self,
new_val: <bool as Specifier>::InOut,
) -> Result<Self, OutOfBounds>
pub fn with_aq_checked( self, new_val: <bool as Specifier>::InOut, ) -> Result<Self, OutOfBounds>
Returns a copy of the bitfield with the value of aq set to the given value.
#Errors
If the given value is out of bounds for aq.
Sourcepub fn set_aq(&mut self, new_val: <bool as Specifier>::InOut)
pub fn set_aq(&mut self, new_val: <bool as Specifier>::InOut)
Sets the value of aq to the given value.
#Panics
If the given value is out of bounds for aq.
Sourcepub fn set_aq_checked(
&mut self,
new_val: <bool as Specifier>::InOut,
) -> Result<(), OutOfBounds>
pub fn set_aq_checked( &mut self, new_val: <bool as Specifier>::InOut, ) -> Result<(), OutOfBounds>
Sets the value of aq to the given value.
#Errors
If the given value is out of bounds for aq.
Sourcepub fn funct5_or_err(
&self,
) -> Result<<B5 as Specifier>::InOut, InvalidBitPattern<<B5 as Specifier>::Bytes>>
pub fn funct5_or_err( &self, ) -> Result<<B5 as Specifier>::InOut, InvalidBitPattern<<B5 as Specifier>::Bytes>>
Returns the value of funct5.
#Errors
If the returned value contains an invalid bit pattern for funct5.
Sourcepub fn with_funct5(self, new_val: <B5 as Specifier>::InOut) -> Self
pub fn with_funct5(self, new_val: <B5 as Specifier>::InOut) -> Self
Returns a copy of the bitfield with the value of funct5 set to the given value.
#Panics
If the given value is out of bounds for funct5.
Sourcepub fn with_funct5_checked(
self,
new_val: <B5 as Specifier>::InOut,
) -> Result<Self, OutOfBounds>
pub fn with_funct5_checked( self, new_val: <B5 as Specifier>::InOut, ) -> Result<Self, OutOfBounds>
Returns a copy of the bitfield with the value of funct5 set to the given value.
#Errors
If the given value is out of bounds for funct5.
Sourcepub fn set_funct5(&mut self, new_val: <B5 as Specifier>::InOut)
pub fn set_funct5(&mut self, new_val: <B5 as Specifier>::InOut)
Sets the value of funct5 to the given value.
#Panics
If the given value is out of bounds for funct5.
Sourcepub fn set_funct5_checked(
&mut self,
new_val: <B5 as Specifier>::InOut,
) -> Result<(), OutOfBounds>
pub fn set_funct5_checked( &mut self, new_val: <B5 as Specifier>::InOut, ) -> Result<(), OutOfBounds>
Sets the value of funct5 to the given value.
#Errors
If the given value is out of bounds for funct5.