pub struct EMBED { /* private fields */ }

Methods from Deref<Target = Mutex<RawMutex, Dictionary>>

Acquires a mutex, blocking the current thread until it is able to do so.

This function will block the local thread until it is available to acquire the mutex. Upon returning, the thread is the only thread with the mutex held. An RAII guard is returned to allow scoped unlock of the lock. When the guard goes out of scope, the mutex will be unlocked.

Attempts to lock a mutex in the thread which already holds the lock will result in a deadlock.

Attempts to acquire this lock.

If the lock could not be acquired at this time, then None is returned. Otherwise, an RAII guard is returned. The lock will be unlocked when the guard is dropped.

This function does not block.

Checks whether the mutex is currently locked.

Forcibly unlocks the mutex.

This is useful when combined with mem::forget to hold a lock without the need to maintain a MutexGuard object alive, for example when dealing with FFI.

Safety

This method must only be called if the current thread logically owns a MutexGuard but that guard has be discarded using mem::forget. Behavior is undefined if a mutex is unlocked when not locked.

Returns the underlying raw mutex object.

Note that you will most likely need to import the RawMutex trait from lock_api to be able to call functions on the raw mutex.

Safety

This method is unsafe because it allows unlocking a mutex while still holding a reference to a MutexGuard.

Returns a raw pointer to the underlying data.

This is useful when combined with mem::forget to hold a lock without the need to maintain a MutexGuard object alive, for example when dealing with FFI.

Safety

You must ensure that there are no data races when dereferencing the returned pointer, for example if the current thread logically owns a MutexGuard but that guard has been discarded using mem::forget.

Forcibly unlocks the mutex using a fair unlock procotol.

This is useful when combined with mem::forget to hold a lock without the need to maintain a MutexGuard object alive, for example when dealing with FFI.

Safety

This method must only be called if the current thread logically owns a MutexGuard but that guard has be discarded using mem::forget. Behavior is undefined if a mutex is unlocked when not locked.

Attempts to acquire this lock until a timeout is reached.

If the lock could not be acquired before the timeout expired, then None is returned. Otherwise, an RAII guard is returned. The lock will be unlocked when the guard is dropped.

Attempts to acquire this lock until a timeout is reached.

If the lock could not be acquired before the timeout expired, then None is returned. Otherwise, an RAII guard is returned. The lock will be unlocked when the guard is dropped.

Trait Implementations

The resulting type after dereferencing.
Dereferences the value.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.