Crate call_once

source ·
Expand description

This crate provides CallOnce, a simple, thread-safe type that can only be called successfully once:

use call_once::CallOnce;

static CALL_ONCE: CallOnce = CallOnce::new();

assert!(CALL_ONCE.call_once().is_ok());
assert!(CALL_ONCE.call_once().is_err());

Structs