pub struct SharedAtomicU32 { /* private fields */ }Implementations§
pub fn create( path: impl AsRef<Path>, init: u32, ) -> Result<Self, SharedAtomicError>
pub fn open(path: impl AsRef<Path>) -> Result<Self, SharedAtomicError>
pub fn load(&self, ord: Ordering) -> u32
pub fn store(&self, v: u32, ord: Ordering)
pub fn fetch_add(&self, v: u32, ord: Ordering) -> u32
pub fn fetch_sub(&self, v: u32, ord: Ordering) -> u32
pub fn fetch_or(&self, v: u32, ord: Ordering) -> u32
pub fn fetch_and(&self, v: u32, ord: Ordering) -> u32
pub fn fetch_xor(&self, v: u32, ord: Ordering) -> u32
pub fn swap(&self, v: u32, ord: Ordering) -> u32
pub fn compare_exchange( &self, current: u32, new: u32, success: Ordering, failure: Ordering, ) -> Result<u32, u32>
pub fn flush(&self) -> Result<(), SharedAtomicError>
Sourcepub fn flush_async(&self) -> Result<(), SharedAtomicError>
pub fn flush_async(&self) -> Result<(), SharedAtomicError>
Non-blocking flush: schedules a writeback via the OS (msync(MS_ASYNC) on Linux; FlushViewOfFile without FlushFileBuffers on Windows). Note: Windows is only partially async (sync to page cache, not to disk).
Trait Implementations§
fn header(&self) -> &HandshakeHeader
fn ring(&self) -> &ObservationRing
fn make_policy(&self) -> Box<dyn Policy>
Source§fn apply_migration(&self, new_tag: u32)
fn apply_migration(&self, new_tag: u32)
Called by the sidecar when the policy returns a new strategy
tag. Default implementation: just set the tag on the header.
Primitives that need heavier migration (data-layout swap)
override this to perform the swap before (or after) updating
the tag.
Auto Trait Implementations§
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