Trait once_self_cell::OnceCellCompatible[][src]

pub trait OnceCellCompatible<T> {
    fn new() -> Self;
fn get(&self) -> Option<&T>;
fn get_or_init<F>(&self, f: F) -> &T
    where
        F: FnOnce() -> T
;
fn take(&mut self) -> Option<T>; }

Required methods

fn new() -> Self[src]

fn get(&self) -> Option<&T>[src]

fn get_or_init<F>(&self, f: F) -> &T where
    F: FnOnce() -> T, 
[src]

fn take(&mut self) -> Option<T>[src]

Loading content...

Implementors

impl OnceCellCompatible<*mut u8> for SyncOnceCell[src]

impl OnceCellCompatible<*mut u8> for UnsyncOnceCell[src]

Loading content...