Struct r3_core::kernel::mutex::MutexRef

source ·
#[repr(transparent)]
pub struct MutexRef<'a, System: KernelMutex>(_, _);
Expand description

Represents a single borrowed mutex in a system.

This type is ABI-compatible with System::RawMutexId. It’s logically equivalent to &'a Mutex but instead stores RawMutexId directly.

See Mutex for the owned counterpart and the description of this kernel object. See MutexMethods for the operations provided by this handle type.

Implementations

Construct a MutexDefiner to define a mutex in a configuration function.

Trait Implementations

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
Feeds this value into the given Hasher. Read more
Feeds a slice of this type into the given Hasher. Read more
The system type this object pertains to.
Construct a Mutex from RawMutexId. Read more
Get the raw RawMutexId value representing this object.
This method tests for self and other values to be equal, and is used by ==. Read more
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason. Read more
This method tests for self and other values to be equal, and is used by ==. Read more
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason. Read more
This method tests for self and other values to be equal, and is used by ==. Read more
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason. Read more

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.

Get a flag indicating whether the mutex is currently locked.
Unlock the mutex. Read more
Acquire the mutex, blocking the current thread until it is able to do so. Read more
lock with timeout.
Non-blocking version of lock. Returns immediately with TryLockMutexError::Timeout if the unblocking condition is not satisfied. Read more
Mark the state protected by the mutex as consistent. Read more
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.