pub struct ThreadLocalConstLazy<T, F = fn() -> T>(_);
Expand description

The type of const thread local lazy that will be dropped.

This type does not implement DerefMut but is intended to be decalred mut to ensure access to is is unsafe.

Implementations§

Initialize a lazy with a builder as argument.

Safety

This variable shall not be used as a thread_local statics or within the state of a thread_local static

Return a pointer to the value.

The value may be in an uninitialized state.

Ensure the value is initialized without optimization check

This is intended to be used at program start up by the dynamic macro.

Ensure the value is initialized

Once this function is called, it is guaranteed that the value is in an initialized state.

This function is always called when the lazy is dereferenced.

Trait Implementations§

Formats the value using the given formatter. Read more
The resulting type after dereferencing.
Dereferences the value.

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.