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.
Re-exports§
use crate::fmt;🔒use crate::panic::RefUnwindSafe;🔒use crate::panic::UnwindSafe;🔒use crate::sys::sync as sys;🔒
Structs§
- Once
- A low-level synchronization primitive for one-time global execution.
- Once
State - State yielded to
Once::call_once_force()’s closure parameter. The state can be used to query the poison status of theOnce.
Enums§
- Once
Exclusive 🔒State - Used for the internal implementation of
sys::sync::onceon different platforms and theLazyLockimplementation.