#[repr(align(64))]struct AtomicRange(AtomicU64);Expand description
A [start, end) pair that can atomically be modified.
Tuple Fields§
§0: AtomicU64Implementations§
Source§impl AtomicRange
impl AtomicRange
Sourcefn new(range: PackedRange) -> Self
fn new(range: PackedRange) -> Self
Creates a new atomic range.
Sourcefn load(&self) -> PackedRange
fn load(&self) -> PackedRange
Atomically loads the range.
Sourcefn store(&self, range: PackedRange)
fn store(&self, range: PackedRange)
Atomically stores the range.
Sourcefn compare_exchange(
&self,
before: PackedRange,
after: PackedRange,
) -> Result<(), PackedRange>
fn compare_exchange( &self, before: PackedRange, after: PackedRange, ) -> Result<(), PackedRange>
Atomically compares and exchanges the range. In case of failure, the range contained in the atomic variable is returned.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for AtomicRange
impl RefUnwindSafe for AtomicRange
impl Send for AtomicRange
impl Sync for AtomicRange
impl Unpin for AtomicRange
impl UnwindSafe for AtomicRange
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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more