[−][src]Struct freertos_rs::MutexImpl
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]
M: MutexInnerImpl,
pub 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
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]
M: MutexInnerImpl + Debug,
Blanket Implementations
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,