pub struct SupervisorTrapVector(/* private fields */);Expand description
The layout of STVEC.
Implementations§
Source§impl SupervisorTrapVector
impl SupervisorTrapVector
Sourcepub const RSVD1_MASK: u64
pub const RSVD1_MASK: u64
Mask of all reserved-as-1 bits.
Sourcepub const RSVD0_MASK: u64
pub const RSVD0_MASK: u64
Mask of all reserved-as-0 bits.
Sourcepub const DEFAULT: u64
pub const DEFAULT: u64
The default value of the layout, combining all field defaults and reserved-as values.
Sourcepub const BASE_SHIFT: usize = 2
pub const BASE_SHIFT: usize = 2
Bit shift (i.e., the low bit) of base.
Sourcepub const MODE_SHIFT: usize = 0
pub const MODE_SHIFT: usize = 0
Bit shift (i.e., the low bit) of mode.
Sourcepub const FIELDS: [FieldMetadata<u64>; 2]
pub const FIELDS: [FieldMetadata<u64>; 2]
Metadata of all named fields in the layout.
Sourcepub const fn new() -> Self
pub const fn new() -> Self
Creates a new instance with reserved-as-1 bits set and
all other bits zeroed (i.e., with a value of
Self::RSVD1_MASK).
pub const fn bits(self) -> u64
Sourcepub const fn set_base(&mut self, value: u64) -> &mut Self
pub const fn set_base(&mut self, value: u64) -> &mut Self
Sets the unshifted value of SupervisorTrapVector[63:2].
Sourcepub fn mode(&self) -> TrapVectorModewhere
TrapVectorMode: TryFromBytes,
pub fn mode(&self) -> TrapVectorModewhere
TrapVectorMode: TryFromBytes,
The value of SupervisorTrapVector[1:0].
§Panics
Panics if the field’s bit pattern is not a valid value of the custom representation. Use Self::try_mode to recover from invalid bit patterns.
Sourcepub fn try_mode(&self) -> Result<TrapVectorMode, InvalidBits<u8>>where
TrapVectorMode: TryFromBytes,
pub fn try_mode(&self) -> Result<TrapVectorMode, InvalidBits<u8>>where
TrapVectorMode: TryFromBytes,
Fallible variant of Self::mode.
Sourcepub fn set_mode(&mut self, value: TrapVectorMode) -> &mut Self
pub fn set_mode(&mut self, value: TrapVectorMode) -> &mut Self
Sets the value of SupervisorTrapVector[1:0].
Trait Implementations§
Source§impl Binary for SupervisorTrapVector
impl Binary for SupervisorTrapVector
Source§fn fmt(&self, f: &mut Formatter<'_>) -> Resultwhere
TrapVectorMode: Debug,
fn fmt(&self, f: &mut Formatter<'_>) -> Resultwhere
TrapVectorMode: Debug,
Source§impl Clone for SupervisorTrapVector
impl Clone for SupervisorTrapVector
Source§fn clone(&self) -> SupervisorTrapVector
fn clone(&self) -> SupervisorTrapVector
1.0.0 (const: unstable)§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for SupervisorTrapVector
Source§impl Debug for SupervisorTrapVector
impl Debug for SupervisorTrapVector
Source§impl Default for SupervisorTrapVector
impl Default for SupervisorTrapVector
Source§fn default() -> Self
fn default() -> Self
Returns an instance with the default bits set (i.e,. with a
value of Self::DEFAULT.
impl Eq for SupervisorTrapVector
Source§impl From<SupervisorTrapVector> for u64
impl From<SupervisorTrapVector> for u64
Source§fn from(value: SupervisorTrapVector) -> Self
fn from(value: SupervisorTrapVector) -> Self
Source§impl From<u64> for SupervisorTrapVector
impl From<u64> for SupervisorTrapVector
Source§impl IntoIterator for SupervisorTrapVector
impl IntoIterator for SupervisorTrapVector
Source§impl<'a> IntoIterator for &'a SupervisorTrapVector
impl<'a> IntoIterator for &'a SupervisorTrapVector
Source§impl LowerHex for SupervisorTrapVector
impl LowerHex for SupervisorTrapVector
Source§fn fmt(&self, f: &mut Formatter<'_>) -> Resultwhere
TrapVectorMode: Debug,
fn fmt(&self, f: &mut Formatter<'_>) -> Resultwhere
TrapVectorMode: Debug,
Source§impl Octal for SupervisorTrapVector
impl Octal for SupervisorTrapVector
Source§fn fmt(&self, f: &mut Formatter<'_>) -> Resultwhere
TrapVectorMode: Debug,
fn fmt(&self, f: &mut Formatter<'_>) -> Resultwhere
TrapVectorMode: Debug,
Source§impl PartialEq for SupervisorTrapVector
impl PartialEq for SupervisorTrapVector
impl StructuralPartialEq for SupervisorTrapVector
Source§impl UpperHex for SupervisorTrapVector
impl UpperHex for SupervisorTrapVector
Source§fn fmt(&self, f: &mut Formatter<'_>) -> Resultwhere
TrapVectorMode: Debug,
fn fmt(&self, f: &mut Formatter<'_>) -> Resultwhere
TrapVectorMode: Debug,
Auto Trait Implementations§
impl Freeze for SupervisorTrapVector
impl RefUnwindSafe for SupervisorTrapVector
impl Send for SupervisorTrapVector
impl Sync for SupervisorTrapVector
impl Unpin for SupervisorTrapVector
impl UnsafeUnpin for SupervisorTrapVector
impl UnwindSafe for SupervisorTrapVector
Blanket Implementations§
§impl<T> Any for Twhere
T: 'static + ?Sized,
impl<T> Any for Twhere
T: 'static + ?Sized,
§impl<T> Borrow<T> for Twhere
T: ?Sized,
impl<T> Borrow<T> for Twhere
T: ?Sized,
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
clone_to_uninit)