Struct lazycell::LazyCell [] [src]

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

A lazily filled Cell, with frozen contents.

Methods

impl<T> LazyCell<T>
[src]

Creates a new, empty, LazyCell.

Put a value into this cell.

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

Test whether this cell has been previously filled.

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.

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

If the cell has not yet been filled, the cell is first filled using the function provided.

Consumes this LazyCell, returning the underlying value.