Struct cargo::util::LazyCell [] [src]

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

Methods

impl<T> LazyCell<T>
[src]

Creates a new empty lazy cell.

Put a value into this cell.

This function will fail if the cell has already been 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.

Consumes this LazyCell, returning the underlying value.

Borrows the contents of this lazy cell, initializing it if necessary.