[][src]Struct maybe_atomic::MaybeAtomicI16

#[repr(transparent)]pub struct MaybeAtomicI16 { /* fields omitted */ }

An atomic structure that wraps either an AtomicI16 or a i16, depending on if atomics are available.

Implementations

impl MaybeAtomicI16[src]

pub fn new(inner: i16) -> Self[src]

Creates a new instance of MaybeAtomicI16.

pub fn get_mut(&mut self) -> &mut i16[src]

Get a mutable reference to the value contained within.

pub fn load(&self, order: Ordering) -> i16[src]

Copy the value out of this container using the specified ordering.

pub fn store(&self, val: i16, order: Ordering)[src]

Store a value in this container.

pub fn swap(&self, val: i16, order: Ordering) -> i16[src]

Swap two values, returning the old value stored in this container.

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.