pub struct StorageMarker<A>(/* private fields */);Implementations§
Source§impl<A> StorageMarker<A>
impl<A> StorageMarker<A>
pub const fn new(v: A) -> Self
pub const fn into_inner(self) -> A
Trait Implementations§
Source§impl<A: AtomicStorage> AtomicStorage for StorageMarker<A>
impl<A: AtomicStorage> AtomicStorage for StorageMarker<A>
Source§const ZERO: Self::Underlying
const ZERO: Self::Underlying
An underlying value initialized to zero. (i.e. all values
of
ZERO should be PartialEq and equal according to
AtomicStorage::compare_exchange_weak).Source§fn new(val: Self::Underlying) -> Self
fn new(val: Self::Underlying) -> Self
Creates a new
AtomicStorage with the value v.Source§fn into_inner(self) -> Self::Underlying
fn into_inner(self) -> Self::Underlying
Consumes the atomic and returns the contained value. Read more
Source§fn get_mut(&mut self) -> &mut Self::Underlying
fn get_mut(&mut self) -> &mut Self::Underlying
Returns a mutable reference to the underlying
AtomicStorageBase::Underlying. Read moreSource§fn load(&self, order: Ordering) -> Self::Underlying
fn load(&self, order: Ordering) -> Self::Underlying
Source§fn store(&self, val: Self::Underlying, order: Ordering)
fn store(&self, val: Self::Underlying, order: Ordering)
Stores a value into the atomic. Read more
Source§fn swap(&self, val: Self::Underlying, order: Ordering) -> Self::Underlying
fn swap(&self, val: Self::Underlying, order: Ordering) -> Self::Underlying
Stores a value into the atomic, returning the previous value. Read more
Source§fn compare_exchange(
&self,
current: Self::Underlying,
new: Self::Underlying,
success: Ordering,
failure: Ordering,
) -> Result<Self::Underlying, Self::Underlying>
fn compare_exchange( &self, current: Self::Underlying, new: Self::Underlying, success: Ordering, failure: Ordering, ) -> Result<Self::Underlying, Self::Underlying>
Stores a value into the atomic if the current value is the same as the
current value. Read moreSource§fn compare_exchange_weak(
&self,
current: Self::Underlying,
new: Self::Underlying,
success: Ordering,
failure: Ordering,
) -> Result<Self::Underlying, Self::Underlying>
fn compare_exchange_weak( &self, current: Self::Underlying, new: Self::Underlying, success: Ordering, failure: Ordering, ) -> Result<Self::Underlying, Self::Underlying>
Stores a value into the atomic if the current value is the same as the
current value. Read moreSource§fn forgettable() -> Self
fn forgettable() -> Self
Creates an atomic value which can be safely forgotten
Source§impl<A: AtomicStorageBase> AtomicStorageBase for StorageMarker<A>
impl<A: AtomicStorageBase> AtomicStorageBase for StorageMarker<A>
Source§type Underlying = UnderlyingMarker<<A as AtomicStorageBase>::Underlying>
type Underlying = UnderlyingMarker<<A as AtomicStorageBase>::Underlying>
The underlying non-atomic type. Typically this should have the same in-memory
representation as
Self.Source§impl<A: Clone> Clone for StorageMarker<A>
impl<A: Clone> Clone for StorageMarker<A>
Source§fn clone(&self) -> StorageMarker<A>
fn clone(&self) -> StorageMarker<A>
Returns a duplicate 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<A: Debug> Debug for StorageMarker<A>
impl<A: Debug> Debug for StorageMarker<A>
Source§impl<A: Default> Default for StorageMarker<A>
impl<A: Default> Default for StorageMarker<A>
Source§fn default() -> StorageMarker<A>
fn default() -> StorageMarker<A>
Returns the “default value” for a type. Read more
Source§impl<A> Deref for StorageMarker<A>
impl<A> Deref for StorageMarker<A>
Source§impl<A> DerefMut for StorageMarker<A>
impl<A> DerefMut for StorageMarker<A>
Source§impl<A, V: Into<A>> From<UnderlyingMarker<V>> for StorageMarker<A>
impl<A, V: Into<A>> From<UnderlyingMarker<V>> for StorageMarker<A>
Source§fn from(v: UnderlyingMarker<V>) -> Self
fn from(v: UnderlyingMarker<V>) -> Self
Converts to this type from the input type.
Source§impl<A: Hash> Hash for StorageMarker<A>
impl<A: Hash> Hash for StorageMarker<A>
Source§impl<A: Ord> Ord for StorageMarker<A>
impl<A: Ord> Ord for StorageMarker<A>
Source§fn cmp(&self, other: &StorageMarker<A>) -> Ordering
fn cmp(&self, other: &StorageMarker<A>) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl<A: PartialEq> PartialEq for StorageMarker<A>
impl<A: PartialEq> PartialEq for StorageMarker<A>
Source§impl<A: PartialOrd> PartialOrd for StorageMarker<A>
impl<A: PartialOrd> PartialOrd for StorageMarker<A>
impl<A: Copy> Copy for StorageMarker<A>
impl<A: Eq> Eq for StorageMarker<A>
impl<A> StructuralPartialEq for StorageMarker<A>
Auto Trait Implementations§
impl<A> Freeze for StorageMarker<A>where
A: Freeze,
impl<A> RefUnwindSafe for StorageMarker<A>where
A: RefUnwindSafe,
impl<A> Send for StorageMarker<A>where
A: Send,
impl<A> Sync for StorageMarker<A>where
A: Sync,
impl<A> Unpin for StorageMarker<A>where
A: Unpin,
impl<A> UnwindSafe for StorageMarker<A>where
A: UnwindSafe,
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§impl<U, A> FromInner<A> for Uwhere
A: AtomicStorage<Underlying = U>,
impl<U, A> FromInner<A> for Uwhere
A: AtomicStorage<Underlying = U>,
Source§fn from_inner(a: A) -> U
fn from_inner(a: A) -> U
Consumes the atomic and returns the contained value. Read more