pub struct CIType { /* private fields */ }Implementations§
Source§impl CIType
impl CIType
Sourcepub const fn into_bytes(self) -> [u8; 2]
pub const fn into_bytes(self) -> [u8; 2]
Sourcepub const fn from_bytes(bytes: [u8; 2]) -> Self
pub const fn from_bytes(bytes: [u8; 2]) -> Self
Converts the given bytes directly into the bitfield struct.
Source§impl CIType
impl CIType
Sourcepub fn op_or_err(
&self,
) -> Result<<B2 as Specifier>::InOut, InvalidBitPattern<<B2 as Specifier>::Bytes>>
pub fn op_or_err( &self, ) -> Result<<B2 as Specifier>::InOut, InvalidBitPattern<<B2 as Specifier>::Bytes>>
Returns the value of op.
#Errors
If the returned value contains an invalid bit pattern for op.
Sourcepub fn with_op(self, new_val: <B2 as Specifier>::InOut) -> Self
pub fn with_op(self, new_val: <B2 as Specifier>::InOut) -> Self
Returns a copy of the bitfield with the value of op set to the given value.
#Panics
If the given value is out of bounds for op.
Sourcepub fn with_op_checked(
self,
new_val: <B2 as Specifier>::InOut,
) -> Result<Self, OutOfBounds>
pub fn with_op_checked( self, new_val: <B2 as Specifier>::InOut, ) -> Result<Self, OutOfBounds>
Returns a copy of the bitfield with the value of op set to the given value.
#Errors
If the given value is out of bounds for op.
Sourcepub fn set_op(&mut self, new_val: <B2 as Specifier>::InOut)
pub fn set_op(&mut self, new_val: <B2 as Specifier>::InOut)
Sets the value of op to the given value.
#Panics
If the given value is out of bounds for op.
Sourcepub fn set_op_checked(
&mut self,
new_val: <B2 as Specifier>::InOut,
) -> Result<(), OutOfBounds>
pub fn set_op_checked( &mut self, new_val: <B2 as Specifier>::InOut, ) -> Result<(), OutOfBounds>
Sets the value of op to the given value.
#Errors
If the given value is out of bounds for op.
Sourcepub fn imm_b5_or_err(
&self,
) -> Result<<B5 as Specifier>::InOut, InvalidBitPattern<<B5 as Specifier>::Bytes>>
pub fn imm_b5_or_err( &self, ) -> Result<<B5 as Specifier>::InOut, InvalidBitPattern<<B5 as Specifier>::Bytes>>
Returns the value of imm_b5.
#Errors
If the returned value contains an invalid bit pattern for imm_b5.
Sourcepub fn with_imm_b5(self, new_val: <B5 as Specifier>::InOut) -> Self
pub fn with_imm_b5(self, new_val: <B5 as Specifier>::InOut) -> Self
Returns a copy of the bitfield with the value of imm_b5 set to the given value.
#Panics
If the given value is out of bounds for imm_b5.
Sourcepub fn with_imm_b5_checked(
self,
new_val: <B5 as Specifier>::InOut,
) -> Result<Self, OutOfBounds>
pub fn with_imm_b5_checked( self, new_val: <B5 as Specifier>::InOut, ) -> Result<Self, OutOfBounds>
Returns a copy of the bitfield with the value of imm_b5 set to the given value.
#Errors
If the given value is out of bounds for imm_b5.
Sourcepub fn set_imm_b5(&mut self, new_val: <B5 as Specifier>::InOut)
pub fn set_imm_b5(&mut self, new_val: <B5 as Specifier>::InOut)
Sets the value of imm_b5 to the given value.
#Panics
If the given value is out of bounds for imm_b5.
Sourcepub fn set_imm_b5_checked(
&mut self,
new_val: <B5 as Specifier>::InOut,
) -> Result<(), OutOfBounds>
pub fn set_imm_b5_checked( &mut self, new_val: <B5 as Specifier>::InOut, ) -> Result<(), OutOfBounds>
Sets the value of imm_b5 to the given value.
#Errors
If the given value is out of bounds for imm_b5.
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 imm_b1_or_err(
&self,
) -> Result<<B1 as Specifier>::InOut, InvalidBitPattern<<B1 as Specifier>::Bytes>>
pub fn imm_b1_or_err( &self, ) -> Result<<B1 as Specifier>::InOut, InvalidBitPattern<<B1 as Specifier>::Bytes>>
Returns the value of imm_b1.
#Errors
If the returned value contains an invalid bit pattern for imm_b1.
Sourcepub fn with_imm_b1(self, new_val: <B1 as Specifier>::InOut) -> Self
pub fn with_imm_b1(self, new_val: <B1 as Specifier>::InOut) -> Self
Returns a copy of the bitfield with the value of imm_b1 set to the given value.
#Panics
If the given value is out of bounds for imm_b1.
Sourcepub fn with_imm_b1_checked(
self,
new_val: <B1 as Specifier>::InOut,
) -> Result<Self, OutOfBounds>
pub fn with_imm_b1_checked( self, new_val: <B1 as Specifier>::InOut, ) -> Result<Self, OutOfBounds>
Returns a copy of the bitfield with the value of imm_b1 set to the given value.
#Errors
If the given value is out of bounds for imm_b1.
Sourcepub fn set_imm_b1(&mut self, new_val: <B1 as Specifier>::InOut)
pub fn set_imm_b1(&mut self, new_val: <B1 as Specifier>::InOut)
Sets the value of imm_b1 to the given value.
#Panics
If the given value is out of bounds for imm_b1.
Sourcepub fn set_imm_b1_checked(
&mut self,
new_val: <B1 as Specifier>::InOut,
) -> Result<(), OutOfBounds>
pub fn set_imm_b1_checked( &mut self, new_val: <B1 as Specifier>::InOut, ) -> Result<(), OutOfBounds>
Sets the value of imm_b1 to the given value.
#Errors
If the given value is out of bounds for imm_b1.
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.