pub trait Producer<T> {
// Required method
fn initialize(self) -> T;
}
Expand description
For use with LazyLock
.
This trait is implemented for FnOnce
closures, so most users can just use
that directly. However in case they need to name a type in the LazyLock
,
they can create a type that implements this trait instead.