[][src]Struct freertos_rs::MutexImpl

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]

pub fn new(t: T) -> Result<Self, FreeRtosError>[src]

Create a new mutex with the given inner value

impl<T> MutexImpl<T, MutexRecursive>[src]

pub 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]

pub fn lock<D: DurationTicks>(
    &self,
    max_wait: D
) -> Result<MutexGuard<T, M>, FreeRtosError>
[src]

Try to obtain a lock and mutable access to our inner value

pub 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]

Blanket Implementations

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]