Struct lazycell::AtomicLazyCell [] [src]

pub struct AtomicLazyCell<T> {
    // some fields omitted

A lazily filled Cell, with frozen contents.


impl<T> AtomicLazyCell<T>

fn new() -> AtomicLazyCell<T>

Creates a new, empty, AtomicLazyCell.

fn fill(&self, t: T) -> Result<(), T>

Put a value into this cell.

This function will return Err(value) is the cell is already full.

fn filled(&self) -> bool

Test whether this cell has been previously filled.

fn borrow(&self) -> Option<&T>

Borrows the contents of this lazy cell for the duration of the cell itself.

This function will return Some if the cell has been previously initialized, and None if it has not yet been initialized.

fn into_inner(self) -> Option<T>

Consumes this LazyCell, returning the underlying value.

Trait Implementations

impl<T: Sync> Sync for AtomicLazyCell<T>

impl<T: Send> Send for AtomicLazyCell<T>