Module once

Source
🔬This is a nightly-only experimental API. (sync_poison_mod #134646)
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§

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

Enums§

ExclusiveState 🔒 Experimental

Constants§

ONCE_INITDeprecatedExperimental
Initialization value for static Once values.