Struct freertos_rs::MutexImpl
[−]
[src]
pub struct MutexImpl<T: ?Sized, M> { /* fields omitted */ }
Mutual exclusion access to a contained value. Can be recursive - the current owner of a lock can re-lock it.
Methods
impl<T> MutexImpl<T, MutexNormal>
[src]
fn new(t: T) -> Result<Self, FreeRtosError>
[src]
Create a new mutex with the given inner value
impl<T> MutexImpl<T, MutexRecursive>
[src]
fn new(t: T) -> Result<Self, FreeRtosError>
[src]
Create a new recursive mutex with the given inner value
impl<T, M> MutexImpl<T, M> where
M: MutexInnerImpl,
[src]
M: MutexInnerImpl,
fn lock<D: DurationTicks>(
&self,
max_wait: D
) -> Result<MutexGuard<T, M>, FreeRtosError>
[src]
&self,
max_wait: D
) -> Result<MutexGuard<T, M>, FreeRtosError>
Try to obtain a lock and mutable access to our inner value
fn into_inner(self) -> T
[src]
Consume the mutex and return its inner value
Trait Implementations
impl<T: Sync + Send, M> Send for MutexImpl<T, M>
[src]
impl<T: Sync + Send, M> Sync for MutexImpl<T, M>
[src]
impl<T: ?Sized, M> Debug for MutexImpl<T, M> where
M: MutexInnerImpl + Debug,
[src]
M: MutexInnerImpl + Debug,