pub struct RiscvFeatures { /* private fields */ }Expand description
A simple container abstraction around the set of RISC-V features.
Implementations§
Source§impl RiscvFeatures
impl RiscvFeatures
Sourcepub const fn from_bits(bits: u64) -> Self
pub const fn from_bits(bits: u64) -> Self
Constructs a feature set from a raw bitmask, in which bit n records
support for the feature whose discriminant is n.
Sourcepub const fn bits(&self) -> u64
pub const fn bits(&self) -> u64
The raw bitmask, in which bit n records support for the feature whose
discriminant is n.
Sourcepub const fn supports(&self, feature: RiscvFeature) -> bool
pub const fn supports(&self, feature: RiscvFeature) -> bool
Whether a given feature is supported.
Sourcepub fn set(&mut self, feature: RiscvFeature, supported: bool) -> &mut Self
pub fn set(&mut self, feature: RiscvFeature, supported: bool) -> &mut Self
Sets support for a given feature.
Sourcepub const fn cbom_size(&self) -> u16
pub const fn cbom_size(&self) -> u16
The cache block size for Cache-Block Management Operations, in bytes.
Sourcepub const fn cboz_size(&self) -> u16
pub const fn cboz_size(&self) -> u16
The cache block size for Cache-Block Zero Operations, in bytes.
Sourcepub fn set_cbom_size(&mut self, size: u16) -> &mut Self
pub fn set_cbom_size(&mut self, size: u16) -> &mut Self
Sets the Cache-Block Management Operations block size.
Sourcepub fn set_cboz_size(&mut self, size: u16) -> &mut Self
pub fn set_cboz_size(&mut self, size: u16) -> &mut Self
Sets the Cache-Block Zero Operations block size.
Trait Implementations§
Source§impl Clone for RiscvFeatures
impl Clone for RiscvFeatures
Source§fn clone(&self) -> RiscvFeatures
fn clone(&self) -> RiscvFeatures
Returns a duplicate of the value. Read more
1.0.0 (const: unstable)§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for RiscvFeatures
Source§impl Debug for RiscvFeatures
impl Debug for RiscvFeatures
Source§impl Default for RiscvFeatures
impl Default for RiscvFeatures
Source§fn default() -> RiscvFeatures
fn default() -> RiscvFeatures
Returns the “default value” for a type. Read more
impl Eq for RiscvFeatures
Source§impl PartialEq for RiscvFeatures
impl PartialEq for RiscvFeatures
impl StructuralPartialEq for RiscvFeatures
Auto Trait Implementations§
impl Freeze for RiscvFeatures
impl RefUnwindSafe for RiscvFeatures
impl Send for RiscvFeatures
impl Sync for RiscvFeatures
impl Unpin for RiscvFeatures
impl UnsafeUnpin for RiscvFeatures
impl UnwindSafe for RiscvFeatures
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
Mutably borrows from an owned value. Read more
§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)
🔬This is a nightly-only experimental API. (
clone_to_uninit)