Struct bitflags::__core::sync::Once
[−]
[src]
pub struct Once { // some fields omitted }1.0.0
A synchronization primitive which can be used to run a one-time global
initialization. Useful for one-time initialization for FFI or related
functionality. This type can only be constructed with the ONCE_INIT
value.
Examples
use std::sync::{Once, ONCE_INIT}; static START: Once = ONCE_INIT; START.call_once(|| { // run initialization here });