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ยง
- Call
Once - A type that can only be called successfully once.
- Call
Once Error - The
CallOnceErrorerror indicates thatCallOnce::call_oncehas been called more than once.