Skip to main content

LazyWithValue

Trait LazyWithValue 

Source
pub trait LazyWithValue<T, F>: LazyNew<T, F> {
    // Required method
    fn with_value(value: T) -> Self;
}

Required Methods§

Source

fn with_value(value: T) -> Self

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<T, F> LazyWithValue<T, F> for LazyFnOnceValue<T, F>
where F: FnOnce() -> T,