pub struct StateSlotHandle { /* private fields */ }Expand description
Lock-free handle to a 32-bit state slot or runtime knob shared between an
instrumented driver and a StateBank.
Implementations§
Source§impl StateSlotHandle
impl StateSlotHandle
Sourcepub fn load(&self) -> u32
pub fn load(&self) -> u32
Loads the current 32-bit value with sequentially consistent ordering.
Sourcepub fn store(&self, value: u32)
pub fn store(&self, value: u32)
Stores a new 32-bit value with sequentially consistent ordering.
Sourcepub fn fetch_add(&self, delta: u32) -> u32
pub fn fetch_add(&self, delta: u32) -> u32
Atomically adds delta to the current value, returning the previous value.
Sourcepub fn fetch_or(&self, mask: u32) -> u32
pub fn fetch_or(&self, mask: u32) -> u32
Atomically bitwise-ORs mask into the current value, returning the previous value.
Trait Implementations§
Source§impl Clone for StateSlotHandle
impl Clone for StateSlotHandle
Source§impl Debug for StateSlotHandle
impl Debug for StateSlotHandle
Auto Trait Implementations§
impl Freeze for StateSlotHandle
impl RefUnwindSafe for StateSlotHandle
impl Send for StateSlotHandle
impl Sync for StateSlotHandle
impl Unpin for StateSlotHandle
impl UnsafeUnpin for StateSlotHandle
impl UnwindSafe for StateSlotHandle
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