Trait concurrency_traits::AsyncTimeoutMutexSized [−][src]
pub trait AsyncTimeoutMutexSized<'a>: Sized + AsyncTimeoutMutex<'a> { fn lock_timeout_async_func<F>(
&'a self,
timeout: Duration,
func: impl FnOnce(Option<&mut Self::Item>) -> F + 'a
) -> Pin<Box<dyn Future<Output = F::Output> + 'a>>
where
F: Future + 'a, { ... } }
The functions for AsyncTimeoutMutex
that only work for sized types.
Separated to allow AsyncTimeoutMutex
to be a trait object.
Provided methods
fn lock_timeout_async_func<F>(
&'a self,
timeout: Duration,
func: impl FnOnce(Option<&mut Self::Item>) -> F + 'a
) -> Pin<Box<dyn Future<Output = F::Output> + 'a>> where
F: Future + 'a,
[src]
&'a self,
timeout: Duration,
func: impl FnOnce(Option<&mut Self::Item>) -> F + 'a
) -> Pin<Box<dyn Future<Output = F::Output> + 'a>> where
F: Future + 'a,
Locks the mutex with a timeout and runs a function on the result asynchronously
Implementation
Should be overwritten by implementors if can be more optimal than creating a guard
Implementations on Foreign Types
impl<'__a, 'a, T> AsyncTimeoutMutexSized<'__a> for &'a T where
T: AsyncTimeoutMutexSized<'__a>,
[src]
impl<'__a, 'a, T> AsyncTimeoutMutexSized<'__a> for &'a T where
T: AsyncTimeoutMutexSized<'__a>,
[src]impl<'__a, 'a, T> AsyncTimeoutMutexSized<'__a> for &'a mut T where
T: AsyncTimeoutMutexSized<'__a>,
[src]
impl<'__a, 'a, T> AsyncTimeoutMutexSized<'__a> for &'a mut T where
T: AsyncTimeoutMutexSized<'__a>,
[src]impl<'__a, T> AsyncTimeoutMutexSized<'__a> for ManuallyDrop<T> where
T: AsyncTimeoutMutexSized<'__a>,
[src]
impl<'__a, T> AsyncTimeoutMutexSized<'__a> for ManuallyDrop<T> where
T: AsyncTimeoutMutexSized<'__a>,
[src]impl<'__a, T> AsyncTimeoutMutexSized<'__a> for AssertUnwindSafe<T> where
T: AsyncTimeoutMutexSized<'__a>,
[src]
impl<'__a, T> AsyncTimeoutMutexSized<'__a> for AssertUnwindSafe<T> where
T: AsyncTimeoutMutexSized<'__a>,
[src]impl<'__a, T> AsyncTimeoutMutexSized<'__a> for Rc<T> where
T: AsyncTimeoutMutexSized<'__a>,
[src]
impl<'__a, T> AsyncTimeoutMutexSized<'__a> for Rc<T> where
T: AsyncTimeoutMutexSized<'__a>,
[src]impl<'__a, T> AsyncTimeoutMutexSized<'__a> for Arc<T> where
T: AsyncTimeoutMutexSized<'__a>,
[src]
impl<'__a, T> AsyncTimeoutMutexSized<'__a> for Arc<T> where
T: AsyncTimeoutMutexSized<'__a>,
[src]impl<'__a, T> AsyncTimeoutMutexSized<'__a> for Box<T> where
T: AsyncTimeoutMutexSized<'__a>,
[src]
impl<'__a, T> AsyncTimeoutMutexSized<'__a> for Box<T> where
T: AsyncTimeoutMutexSized<'__a>,
[src]impl<'__a, 'a, T> AsyncTimeoutMutexSized<'__a> for Cow<'a, T> where
T: AsyncTimeoutMutexSized<'__a> + Clone,
[src]
impl<'__a, 'a, T> AsyncTimeoutMutexSized<'__a> for Cow<'a, T> where
T: AsyncTimeoutMutexSized<'__a> + Clone,
[src]Implementors
impl<'a, T, M> AsyncTimeoutMutexSized<'a> for CustomMutex<T, M> where
T: 'a,
M: RawAsyncTimeoutMutex + 'a,
[src]
impl<'a, T, M> AsyncTimeoutMutexSized<'a> for CustomMutex<T, M> where
T: 'a,
M: RawAsyncTimeoutMutex + 'a,
[src]