Trait concurrency_traits::AsyncTimeoutMutex [−][src]
pub trait AsyncTimeoutMutex<'a>: AsyncMutex<'a> { type LockTimeoutFuture: Future<Output = Option<Self::AsyncGuard>>; fn lock_timeout_async(
&'a self,
timeout: Duration
) -> Self::LockTimeoutFuture; }
An async mutex that locking can timeout on.
Implementation
It is recommended to implement AsyncTimeoutMutexSized
if the
implement-ee can be sized.
Associated Types
type LockTimeoutFuture: Future<Output = Option<Self::AsyncGuard>>
[src]
The future returned by lock_timeout_async
Required methods
fn lock_timeout_async(&'a self, timeout: Duration) -> Self::LockTimeoutFuture
[src]
Locks the mutex asynchronously with a timeout.
Implementations on Foreign Types
impl<'__a, 'a, T: ?Sized> AsyncTimeoutMutex<'__a> for &'a T where
T: AsyncTimeoutMutex<'__a>,
[src]
impl<'__a, 'a, T: ?Sized> AsyncTimeoutMutex<'__a> for &'a T where
T: AsyncTimeoutMutex<'__a>,
[src]type LockTimeoutFuture = T::LockTimeoutFuture
fn lock_timeout_async(&'__a self, timeout: Duration) -> Self::LockTimeoutFuture
[src]
impl<'__a, 'a, T: ?Sized> AsyncTimeoutMutex<'__a> for &'a mut T where
T: AsyncTimeoutMutex<'__a>,
[src]
impl<'__a, 'a, T: ?Sized> AsyncTimeoutMutex<'__a> for &'a mut T where
T: AsyncTimeoutMutex<'__a>,
[src]type LockTimeoutFuture = T::LockTimeoutFuture
fn lock_timeout_async(&'__a self, timeout: Duration) -> Self::LockTimeoutFuture
[src]
impl<'__a, T: ?Sized> AsyncTimeoutMutex<'__a> for ManuallyDrop<T> where
T: AsyncTimeoutMutex<'__a>,
[src]
impl<'__a, T: ?Sized> AsyncTimeoutMutex<'__a> for ManuallyDrop<T> where
T: AsyncTimeoutMutex<'__a>,
[src]type LockTimeoutFuture = T::LockTimeoutFuture
fn lock_timeout_async(&'__a self, timeout: Duration) -> Self::LockTimeoutFuture
[src]
impl<'__a, T> AsyncTimeoutMutex<'__a> for AssertUnwindSafe<T> where
T: AsyncTimeoutMutex<'__a>,
[src]
impl<'__a, T> AsyncTimeoutMutex<'__a> for AssertUnwindSafe<T> where
T: AsyncTimeoutMutex<'__a>,
[src]type LockTimeoutFuture = T::LockTimeoutFuture
fn lock_timeout_async(&'__a self, timeout: Duration) -> Self::LockTimeoutFuture
[src]
impl<'__a, T: ?Sized> AsyncTimeoutMutex<'__a> for Rc<T> where
T: AsyncTimeoutMutex<'__a>,
[src]
impl<'__a, T: ?Sized> AsyncTimeoutMutex<'__a> for Rc<T> where
T: AsyncTimeoutMutex<'__a>,
[src]type LockTimeoutFuture = T::LockTimeoutFuture
fn lock_timeout_async(&'__a self, timeout: Duration) -> Self::LockTimeoutFuture
[src]
impl<'__a, T: ?Sized> AsyncTimeoutMutex<'__a> for Arc<T> where
T: AsyncTimeoutMutex<'__a>,
[src]
impl<'__a, T: ?Sized> AsyncTimeoutMutex<'__a> for Arc<T> where
T: AsyncTimeoutMutex<'__a>,
[src]type LockTimeoutFuture = T::LockTimeoutFuture
fn lock_timeout_async(&'__a self, timeout: Duration) -> Self::LockTimeoutFuture
[src]
impl<'__a, T: ?Sized> AsyncTimeoutMutex<'__a> for Box<T> where
T: AsyncTimeoutMutex<'__a>,
[src]
impl<'__a, T: ?Sized> AsyncTimeoutMutex<'__a> for Box<T> where
T: AsyncTimeoutMutex<'__a>,
[src]type LockTimeoutFuture = T::LockTimeoutFuture
fn lock_timeout_async(&'__a self, timeout: Duration) -> Self::LockTimeoutFuture
[src]
impl<'__a, 'a, T> AsyncTimeoutMutex<'__a> for Cow<'a, T> where
T: AsyncTimeoutMutex<'__a> + Clone,
[src]
impl<'__a, 'a, T> AsyncTimeoutMutex<'__a> for Cow<'a, T> where
T: AsyncTimeoutMutex<'__a> + Clone,
[src]type LockTimeoutFuture = T::LockTimeoutFuture
fn lock_timeout_async(&'__a self, timeout: Duration) -> Self::LockTimeoutFuture
[src]
impl<'a, T> AsyncTimeoutMutex<'a> for Pin<T> where
T: Deref,
T::Target: AsyncTimeoutMutex<'a>,
[src]
impl<'a, T> AsyncTimeoutMutex<'a> for Pin<T> where
T: Deref,
T::Target: AsyncTimeoutMutex<'a>,
[src]type LockTimeoutFuture = <T::Target as AsyncTimeoutMutex<'a>>::LockTimeoutFuture
fn lock_timeout_async(&'a self, timeout: Duration) -> Self::LockTimeoutFuture
[src]
Implementors
impl<'a, T, M> AsyncTimeoutMutex<'a> for CustomMutex<T, M> where
T: 'a,
M: RawAsyncTimeoutMutex + 'a,
[src]
impl<'a, T, M> AsyncTimeoutMutex<'a> for CustomMutex<T, M> where
T: 'a,
M: RawAsyncTimeoutMutex + 'a,
[src]