Struct shared_bus::NullMutex

source ·
pub struct NullMutex<T> { /* private fields */ }
Expand description

“Dummy” mutex for sharing in a single task/thread.

This mutex type can be used when all bus users are contained in a single execution context. In such a situation, no actual mutex is needed, because a RefCell alone is sufficient to ensuring only a single peripheral can access the bus at the same time.

This mutex type is used with the BusManagerSimple type.

To uphold safety, this type is !Send and !Sync.

Trait Implementations

The actual bus that is wrapped inside this mutex.
Create a new mutex of this type.
Lock the mutex and give a closure access to the bus inside.
Formats the value using the given formatter. 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.

Should always be Self
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.