pub struct EventSuppression { /* private fields */ }Expand description
Event suppression structure for controlling notifications.
Implementations§
Source§impl EventSuppression
impl EventSuppression
pub const SIZE: usize
pub const ALIGN: usize
pub const WRAP_OFFSET: usize
pub const FLAGS_OFFSET: usize
Sourcepub fn new(off_wrap: u16, flags: EventFlags) -> Self
pub fn new(off_wrap: u16, flags: EventFlags) -> Self
Create a new event suppression with the given offset/wrap and flags.
Sourcepub fn flags(&self) -> EventFlags
pub fn flags(&self) -> EventFlags
Get the event flags.
Sourcepub fn set_flags(&mut self, flags: EventFlags)
pub fn set_flags(&mut self, flags: EventFlags)
Set the event flags.
Sourcepub fn desc_event_off(&self) -> u16
pub fn desc_event_off(&self) -> u16
Get the descriptor event offset (bits 0-14).
Sourcepub fn desc_event_wrap(&self) -> bool
pub fn desc_event_wrap(&self) -> bool
Check if the descriptor event wrap bit (bit 15) is set.
Sourcepub fn set_desc_event(&mut self, off: u16, wrap: bool)
pub fn set_desc_event(&mut self, off: u16, wrap: bool)
Set the descriptor event offset and wrap bit.
Sourcepub fn read_flags_acquire<M: MemOps>(
mem: &M,
addr: u64,
) -> Result<EventFlags, M::Error>
pub fn read_flags_acquire<M: MemOps>( mem: &M, addr: u64, ) -> Result<EventFlags, M::Error>
Acquire-load only the flags word - the publish point - without reading
the off_wrap payload.
§Invariant
The caller must ensure that addr is a valid pointer to an EventSuppression.
Sourcepub fn read_body<M: MemOps>(
mem: &M,
addr: u64,
flags: EventFlags,
) -> Result<Self, M::Error>
pub fn read_body<M: MemOps>( mem: &M, addr: u64, flags: EventFlags, ) -> Result<Self, M::Error>
Read the off_wrap payload and combine it with flags already obtained
from read_flags_acquire.
§Invariant
The caller must ensure that addr is a valid pointer to an EventSuppression.
Trait Implementations§
Source§impl Clone for EventSuppression
impl Clone for EventSuppression
Source§fn clone(&self) -> EventSuppression
fn clone(&self) -> EventSuppression
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for EventSuppression
Source§impl Debug for EventSuppression
impl Debug for EventSuppression
impl Eq for EventSuppression
Source§impl Hash for EventSuppression
impl Hash for EventSuppression
Source§impl PartialEq for EventSuppression
impl PartialEq for EventSuppression
Source§fn eq(&self, other: &EventSuppression) -> bool
fn eq(&self, other: &EventSuppression) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Pod for EventSuppression
impl StructuralPartialEq for EventSuppression
Auto Trait Implementations§
impl Freeze for EventSuppression
impl RefUnwindSafe for EventSuppression
impl Send for EventSuppression
impl Sync for EventSuppression
impl Unpin for EventSuppression
impl UnsafeUnpin for EventSuppression
impl UnwindSafe for EventSuppression
Blanket Implementations§
impl<T> AnyBitPattern for Twhere
T: Pod,
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> CheckedBitPattern for Twhere
T: AnyBitPattern,
impl<T> CheckedBitPattern for Twhere
T: AnyBitPattern,
Source§type Bits = T
type Bits = T
Self must have the same layout as the specified Bits except for
the possible invalid bit patterns being checked during
is_valid_bit_pattern.Source§fn is_valid_bit_pattern(_bits: &T) -> bool
fn is_valid_bit_pattern(_bits: &T) -> bool
If this function returns true, then it must be valid to reinterpret
bits
as &Self.