pub struct RShamt64Type { /* private fields */ }Implementations§
Source§impl RShamt64Type
impl RShamt64Type
Source§impl RShamt64Type
impl RShamt64Type
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 RShamt64Type
impl RShamt64Type
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 shamt_or_err(
&self,
) -> Result<<B6 as Specifier>::InOut, InvalidBitPattern<<B6 as Specifier>::Bytes>>
pub fn shamt_or_err( &self, ) -> Result<<B6 as Specifier>::InOut, InvalidBitPattern<<B6 as Specifier>::Bytes>>
Returns the value of shamt.
#Errors
If the returned value contains an invalid bit pattern for shamt.
Sourcepub fn with_shamt(self, new_val: <B6 as Specifier>::InOut) -> Self
pub fn with_shamt(self, new_val: <B6 as Specifier>::InOut) -> Self
Returns a copy of the bitfield with the value of shamt set to the given value.
#Panics
If the given value is out of bounds for shamt.
Sourcepub fn with_shamt_checked(
self,
new_val: <B6 as Specifier>::InOut,
) -> Result<Self, OutOfBounds>
pub fn with_shamt_checked( self, new_val: <B6 as Specifier>::InOut, ) -> Result<Self, OutOfBounds>
Returns a copy of the bitfield with the value of shamt set to the given value.
#Errors
If the given value is out of bounds for shamt.
Sourcepub fn set_shamt(&mut self, new_val: <B6 as Specifier>::InOut)
pub fn set_shamt(&mut self, new_val: <B6 as Specifier>::InOut)
Sets the value of shamt to the given value.
#Panics
If the given value is out of bounds for shamt.
Sourcepub fn set_shamt_checked(
&mut self,
new_val: <B6 as Specifier>::InOut,
) -> Result<(), OutOfBounds>
pub fn set_shamt_checked( &mut self, new_val: <B6 as Specifier>::InOut, ) -> Result<(), OutOfBounds>
Sets the value of shamt to the given value.
#Errors
If the given value is out of bounds for shamt.
Sourcepub fn funct6_or_err(
&self,
) -> Result<<B6 as Specifier>::InOut, InvalidBitPattern<<B6 as Specifier>::Bytes>>
pub fn funct6_or_err( &self, ) -> Result<<B6 as Specifier>::InOut, InvalidBitPattern<<B6 as Specifier>::Bytes>>
Returns the value of funct6.
#Errors
If the returned value contains an invalid bit pattern for funct6.
Sourcepub fn with_funct6(self, new_val: <B6 as Specifier>::InOut) -> Self
pub fn with_funct6(self, new_val: <B6 as Specifier>::InOut) -> Self
Returns a copy of the bitfield with the value of funct6 set to the given value.
#Panics
If the given value is out of bounds for funct6.
Sourcepub fn with_funct6_checked(
self,
new_val: <B6 as Specifier>::InOut,
) -> Result<Self, OutOfBounds>
pub fn with_funct6_checked( self, new_val: <B6 as Specifier>::InOut, ) -> Result<Self, OutOfBounds>
Returns a copy of the bitfield with the value of funct6 set to the given value.
#Errors
If the given value is out of bounds for funct6.
Sourcepub fn set_funct6(&mut self, new_val: <B6 as Specifier>::InOut)
pub fn set_funct6(&mut self, new_val: <B6 as Specifier>::InOut)
Sets the value of funct6 to the given value.
#Panics
If the given value is out of bounds for funct6.
Sourcepub fn set_funct6_checked(
&mut self,
new_val: <B6 as Specifier>::InOut,
) -> Result<(), OutOfBounds>
pub fn set_funct6_checked( &mut self, new_val: <B6 as Specifier>::InOut, ) -> Result<(), OutOfBounds>
Sets the value of funct6 to the given value.
#Errors
If the given value is out of bounds for funct6.
Trait Implementations§
Source§impl Clone for RShamt64Type
impl Clone for RShamt64Type
Source§fn clone(&self) -> RShamt64Type
fn clone(&self) -> RShamt64Type
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more