Trait tokenlock::SingletonTokenFactory [−][src]
Associates a type with a flag indicating whether an instance of
SingletonToken
<Self>
is present.
Enables the SingletonToken
::<Self>::
new
method.
Use impl_singleton_token_factory!
to implement this trait.
Safety
Implementing this trait incorrectly might break Token
's invariants.
Required methods
fn take() -> bool
[src]
Take a token. Returns true
if successful.
unsafe fn return()
[src]
Return a token.
Safety
Each call to this method must be accompanied with the destruction of an
actually-existing instance of SingletonToken
.