[][src]Struct maybe_atomic::MaybeAtomicU8

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

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

Implementations

impl MaybeAtomicU8[src]

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

Creates a new instance of MaybeAtomicU8.

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

Get a mutable reference to the value contained within.

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

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

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

Store a value in this container.

pub fn swap(&self, val: u8, order: Ordering) -> u8[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.