pub type Lazy<T, F = fn() -> T> = Lazy<T, F>;
Expand description
A value which is initialized on the first access. See lazy::Lazy
for documentation.
A note for advanced users: this alias exists to avoid subtle type inference errors due to the default relax strategy type parameter. If you need a non-default relax strategy, use the fully-qualified path.
Aliased Type§
struct Lazy<T, F = fn() -> T> { /* private fields */ }
Implementations§
source§impl<T, F, R> Lazy<T, F, R>
impl<T, F, R> Lazy<T, F, R>
sourcepub fn as_mut_ptr(&self) -> *mut T
pub fn as_mut_ptr(&self) -> *mut T
Retrieves a mutable pointer to the inner data.
This is especially useful when interfacing with low level code or FFI where the caller explicitly knows that it has exclusive access to the inner data. Note that reading from this pointer is UB until initialized or directly written to.