Module once

Module once 

Source
Expand description

A “once initialization” primitive

This primitive is meant to be used to run one-time initialization. An example use case would be for initializing an FFI library.

Structs§

Once
A low-level synchronization primitive for one-time global execution.
OnceState
State yielded to Once::call_once_force()’s closure parameter. The state can be used to query the poison status of the Once.

Enums§

OnceExclusiveState 🔒
Used for the internal implementation of sys::sync::once on different platforms and the LazyLock implementation.

Constants§

ONCE_INITDeprecated
Initialization value for static Once values.