Struct atomptr::AtomPtr[][src]

pub struct AtomPtr<T> { /* fields omitted */ }

A safe atomic pointer wrapper


impl<T> AtomPtr<T>[src]

pub fn new(t: T) -> Self[src]

Create a new atomic pointer for a type

pub fn get_ref(&self) -> Ref<T>[src]

Get an immutable reference to the current value

pub fn swap(&self, new: T) -> Ref<T>[src]

Swap the data entry with a new value, returning the old

Trait Implementations

impl<T: Clone> Clone for AtomPtr<T>[src]

impl<T: Debug> Debug for AtomPtr<T>[src]

impl<T: Default> Default for AtomPtr<T>[src]

impl<T> PartialEq<AtomPtr<T>> for AtomPtr<T>[src]

Auto Trait Implementations

impl<T> RefUnwindSafe for AtomPtr<T>[src]

impl<T> Send for AtomPtr<T>[src]

impl<T> Sync for AtomPtr<T>[src]

impl<T> Unpin for AtomPtr<T>[src]

impl<T> UnwindSafe for AtomPtr<T>[src]

Blanket Implementations

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

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

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

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

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

impl<T> ToOwned for T where
    T: Clone

type Owned = T

The resulting type after obtaining ownership.

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

type Error = Infallible

The type returned in the event of a conversion error.

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

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

The type returned in the event of a conversion error.