Trait concurrency_traits::mutex::TryMutexSized [−][src]
pub trait TryMutexSized<'a>: Sized + TryMutex<'a> { fn try_lock_func<O>(
&'a self,
func: impl FnOnce(Option<&mut Self::Item>) -> O
) -> O { ... } }
Expand description
Provided methods
fn try_lock_func<O>(
&'a self,
func: impl FnOnce(Option<&mut Self::Item>) -> O
) -> O
[src]
fn try_lock_func<O>(
&'a self,
func: impl FnOnce(Option<&mut Self::Item>) -> O
) -> O
[src]Runs the function the value in the mutex if available immediately.
Implementation
Should be overwritten by implementors if can be more optimal than creating a guard
Implementations on Foreign Types
impl<'a, T> TryMutexSized<'a> for Mutex<T> where
T: 'a,
[src]
T: 'a,
Implementors
impl<'a, T, M> TryMutexSized<'a> for CustomMutex<T, M> where
T: 'a,
M: RawTryMutex + 'a,
[src]
impl<'a, T, M> TryMutexSized<'a> for CustomMutex<T, M> where
T: 'a,
M: RawTryMutex + 'a,
[src]fn try_lock_func<O>(
&'a self,
func: impl FnOnce(Option<&mut Self::Item>) -> O
) -> O
[src]
&'a self,
func: impl FnOnce(Option<&mut Self::Item>) -> O
) -> O