StorageMarker

Struct StorageMarker 

Source
pub struct StorageMarker<A>(/* private fields */);

Implementations§

Source§

impl<A> StorageMarker<A>

Source

pub const fn new(v: A) -> Self

Source

pub const fn into_inner(self) -> A

Trait Implementations§

Source§

impl<A: AtomicStorage> AtomicStorage for StorageMarker<A>

Source§

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

Creates a new AtomicStorage with the value v.
Source§

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

Returns a mutable reference to the underlying AtomicStorageBase::Underlying. Read more
Source§

fn load(&self, order: Ordering) -> Self::Underlying

load takes an Ordering argument which describes the memory ordering of this operation. Possible values are SeqCst, Acquire and Relaxed. Read more
Source§

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

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>

Stores a value into the atomic if the current value is the same as the current value. Read more
Source§

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 more
Source§

fn forgettable() -> Self

Creates an atomic value which can be safely forgotten
Source§

impl<A: AtomicStorageBase> AtomicStorageBase for StorageMarker<A>

Source§

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>

Source§

fn clone(&self) -> StorageMarker<A>

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<A: Debug> Debug for StorageMarker<A>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<A: Default> Default for StorageMarker<A>

Source§

fn default() -> StorageMarker<A>

Returns the “default value” for a type. Read more
Source§

impl<A> Deref for StorageMarker<A>

Source§

type Target = A

The resulting type after dereferencing.
Source§

fn deref(&self) -> &A

Dereferences the value.
Source§

impl<A> DerefMut for StorageMarker<A>

Source§

fn deref_mut(&mut self) -> &mut A

Mutably dereferences the value.
Source§

impl<A, V: Into<A>> From<UnderlyingMarker<V>> for StorageMarker<A>

Source§

fn from(v: UnderlyingMarker<V>) -> Self

Converts to this type from the input type.
Source§

impl<A: Hash> Hash for StorageMarker<A>

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl<A: Ord> Ord for StorageMarker<A>

Source§

fn cmp(&self, other: &StorageMarker<A>) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · Source§

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · Source§

fn min(self, other: Self) -> Self
where Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · Source§

fn clamp(self, min: Self, max: Self) -> Self
where Self: Sized,

Restrict a value to a certain interval. Read more
Source§

impl<A: PartialEq> PartialEq for StorageMarker<A>

Source§

fn eq(&self, other: &StorageMarker<A>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<A: PartialOrd> PartialOrd for StorageMarker<A>

Source§

fn partial_cmp(&self, other: &StorageMarker<A>) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · Source§

fn lt(&self, other: &Rhs) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · Source§

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · Source§

fn gt(&self, other: &Rhs) -> bool

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · Source§

fn ge(&self, other: &Rhs) -> bool

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl<A: Copy> Copy for StorageMarker<A>

Source§

impl<A: Eq> Eq for StorageMarker<A>

Source§

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> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<U, A> FromInner<A> for U
where A: AtomicStorage<Underlying = U>,

Source§

fn from_inner(a: A) -> U

Consumes the atomic and returns the contained value. Read more
Source§

impl<T, W> HasTypeWitness<W> for T
where W: MakeTypeWitness<Arg = T>, T: ?Sized,

Source§

const WITNESS: W = W::MAKE

A constant of the type witness
Source§

impl<T> Identity for T
where T: ?Sized,

Source§

const TYPE_EQ: TypeEq<T, <T as Identity>::Type> = TypeEq::NEW

Proof that Self is the same type as Self::Type, provides methods for casting between Self and Self::Type.
Source§

type Type = T

The same type as Self, used to emulate type equality bounds (T == U) with associated type equality constraints (T: Identity<Type = U>).
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<P, T> Receiver for P
where P: Deref<Target = T> + ?Sized, T: ?Sized,

Source§

type Target = T

🔬This is a nightly-only experimental API. (arbitrary_self_types)
The target type on which the method may be called.
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.