Struct emf_core_base_rs::global::LockToken [−][src]
pub struct LockToken<T> { /* fields omitted */ }
A token indicating a locked interface.
Implementations
impl LockToken<Unlock>
[src]
impl LockToken<Unlock>
[src]pub unsafe fn relinquish_locking(self) -> LockToken<ForgetUnlock>
[src]
Takes ownership of the token and exchanges it with a token which does not unlock the interface.
Safety
Improper usage can leave the interface in a locked state.
impl LockToken<ForgetUnlock>
[src]
impl LockToken<ForgetUnlock>
[src]pub unsafe fn take_ownership(self) -> LockToken<Unlock>
[src]
Takes ownership of the token and exchanges it with a token which unlocks the interface.
Safety
Improper usage can unlock the interface multiple times.
impl<T> LockToken<T>
[src]
impl<T> LockToken<T>
[src]#[must_use]pub fn lock() -> LockToken<Unlock>
[src]
#[must_use]
pub fn lock() -> LockToken<Unlock>Constructs a new token by locking the interface.
The calling thread is stalled until the lock can be acquired. Only one thread can hold the lock at a time.
Return
A token.
#[must_use]pub fn try_lock() -> Option<LockToken<Unlock>>
[src]
#[must_use]
pub fn try_lock() -> Option<LockToken<Unlock>>pub unsafe fn assume_locked() -> LockToken<ForgetUnlock>
[src]
Trait Implementations
Auto Trait Implementations
impl<T> RefUnwindSafe for LockToken<T> where
T: RefUnwindSafe,
impl<T> RefUnwindSafe for LockToken<T> where
T: RefUnwindSafe,
impl<T> UnwindSafe for LockToken<T> where
T: UnwindSafe,
impl<T> UnwindSafe for LockToken<T> where
T: UnwindSafe,