pub struct Once { /* private fields */ }The parkinglot feature has been renamed parking_lot
Expand description
A dependency-tracking wrapper for ::parking_lot::Once.
Implementations§
Source§impl Once
impl Once
Sourcepub const fn new() -> Self
👎Deprecated: The parkinglot feature has been renamed parking_lot
pub const fn new() -> Self
The parkinglot feature has been renamed parking_lot
Create a new Once value.
Sourcepub fn state(&self) -> OnceState
👎Deprecated: The parkinglot feature has been renamed parking_lot
pub fn state(&self) -> OnceState
The parkinglot feature has been renamed parking_lot
Returns the current state of this Once.
Sourcepub fn call_once(&self, f: impl FnOnce())
👎Deprecated: The parkinglot feature has been renamed parking_lot
pub fn call_once(&self, f: impl FnOnce())
The parkinglot feature has been renamed parking_lot
This call is considered as “locking this Once” and it participates in dependency
tracking as such.
§Panics
This method will panic if f panics, poisoning this Once. In addition, this function
panics when the lock acquisition order is determined to be inconsistent.
Sourcepub fn call_once_force(&self, f: impl FnOnce(OnceState))
👎Deprecated: The parkinglot feature has been renamed parking_lot
pub fn call_once_force(&self, f: impl FnOnce(OnceState))
The parkinglot feature has been renamed parking_lot
Performs the given initialization routine once and only once.
This method is identical to Once::call_once except it ignores poisoning.