Struct atom::AtomSetOnce [] [src]

pub struct AtomSetOnce<P> where
    P: IntoRawPtr + FromRawPtr
{ /* fields omitted */ }

This is a restricted version of the Atom. It allows for only set_if_none to be called.

swap and take can be used only with a mutable reference. Meaning that AtomSetOnce is not usable as a

Methods

impl<P> AtomSetOnce<P> where
    P: IntoRawPtr + FromRawPtr
[src]

[src]

Create an empty AtomSetOnce

[src]

Create a new AtomSetOnce from Pointer P

[src]

This will do a CAS setting the value only if it is NULL this will return OK(()) if the value was written, otherwise a Err(P) will be returned, where the value was the same value that you passed into this function

[src]

Convert an AtomSetOnce into an Atom

[src]

Allow access to the atom if exclusive access is granted

[src]

Check to see if an atom is None

This only means that the contents was None when it was measured

impl<T, P> AtomSetOnce<P> where
    P: IntoRawPtr + FromRawPtr + Deref<Target = T>, 
[src]

[src]

If the Atom is set, get the value

impl<T> AtomSetOnce<Box<T>>
[src]

[src]

If the Atom is set, get the value

impl<T> AtomSetOnce<T> where
    T: Clone + IntoRawPtr + FromRawPtr
[src]

[src]

Duplicate the inner pointer if it is set

Trait Implementations

impl<P: Debug> Debug for AtomSetOnce<P> where
    P: IntoRawPtr + FromRawPtr
[src]

[src]

Formats the value using the given formatter. Read more

Auto Trait Implementations

impl<P> Send for AtomSetOnce<P>

impl<P> Sync for AtomSetOnce<P>