#[repr(C)]pub struct CounterMask { /* private fields */ }
Expand description
Counter index mask structure in SBI function calls for the PMU
extension §11.
Implementations§
Source§impl CounterMask
impl CounterMask
Sourcepub const IGNORE_MASK: usize = 4_294_967_295usize
pub const IGNORE_MASK: usize = 4_294_967_295usize
Special value to ignore the mask
, and consider all bit
s as set.
Sourcepub const fn from_mask_base(
counter_idx_mask: usize,
counter_idx_base: usize,
) -> Self
pub const fn from_mask_base( counter_idx_mask: usize, counter_idx_base: usize, ) -> Self
Construct a CounterMask from mask value and base counter index.
Sourcepub const fn ignore_mask(&self) -> usize
pub const fn ignore_mask(&self) -> usize
Gets the special value for ignoring the mask
parameter.
Sourcepub const fn into_inner(self) -> (usize, usize)
pub const fn into_inner(self) -> (usize, usize)
Returns mask
and base
parameters from the CounterMask.
Sourcepub const fn has_bit(self, counter: usize) -> bool
pub const fn has_bit(self, counter: usize) -> bool
Returns whether the CounterMask contains the provided counter
.
Trait Implementations§
Source§impl Clone for CounterMask
impl Clone for CounterMask
Source§fn clone(&self) -> CounterMask
fn clone(&self) -> CounterMask
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for CounterMask
impl Debug for CounterMask
Source§impl PartialEq for CounterMask
impl PartialEq for CounterMask
impl Copy for CounterMask
impl Eq for CounterMask
impl StructuralPartialEq for CounterMask
Auto Trait Implementations§
impl Freeze for CounterMask
impl RefUnwindSafe for CounterMask
impl Send for CounterMask
impl Sync for CounterMask
impl Unpin for CounterMask
impl UnwindSafe for CounterMask
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)