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]
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]
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>
[src]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.
pub unsafe fn assume_locked() -> LockToken<ForgetUnlock>
[src]
pub unsafe fn assume_locked() -> LockToken<ForgetUnlock>
[src]Trait Implementations
Auto Trait Implementations
impl<T> RefUnwindSafe for LockToken<T> where
T: RefUnwindSafe,
T: RefUnwindSafe,
impl<T> Send for LockToken<T> where
T: Send,
T: Send,
impl<T> Sync for LockToken<T> where
T: Sync,
T: Sync,
impl<T> Unpin for LockToken<T> where
T: Unpin,
T: Unpin,
impl<T> UnwindSafe for LockToken<T> where
T: UnwindSafe,
T: UnwindSafe,