Trait concurrency_traits::rw_lock::AsyncRwLock [−][src]
pub trait AsyncRwLock<'a>: TryRwLock<'a> { #[must_use] fn read_async<'async_trait>(
&'a self
) -> Pin<Box<dyn Future<Output = Self::ReadGuard> + Send + 'async_trait>>
where
'a: 'async_trait,
Self: 'async_trait; #[must_use] fn write_async<'async_trait>(
&'a self
) -> Pin<Box<dyn Future<Output = Self::WriteGuard> + Send + 'async_trait>>
where
'a: 'async_trait,
Self: 'async_trait; }
Expand description
A generic async reader-writer lock trait
Required methods
#[must_use]fn read_async<'async_trait>(
&'a self
) -> Pin<Box<dyn Future<Output = Self::ReadGuard> + Send + 'async_trait>> where
'a: 'async_trait,
Self: 'async_trait,
[src]
#[must_use]fn read_async<'async_trait>(
&'a self
) -> Pin<Box<dyn Future<Output = Self::ReadGuard> + Send + 'async_trait>> where
'a: 'async_trait,
Self: 'async_trait,
[src]Reads the lock asynchronously, giving a future that will contain the read lock
#[must_use]fn write_async<'async_trait>(
&'a self
) -> Pin<Box<dyn Future<Output = Self::WriteGuard> + Send + 'async_trait>> where
'a: 'async_trait,
Self: 'async_trait,
[src]
#[must_use]fn write_async<'async_trait>(
&'a self
) -> Pin<Box<dyn Future<Output = Self::WriteGuard> + Send + 'async_trait>> where
'a: 'async_trait,
Self: 'async_trait,
[src]Writes to the lock asynchronously, giving a future that will contain the write lock
Implementors
impl<'a, T, R> AsyncRwLock<'a> for CustomRwLock<T, R> where
T: 'a + Send + Sync,
R: RawAsyncRwLock + 'a + Send + Sync,
[src]
impl<'a, T, R> AsyncRwLock<'a> for CustomRwLock<T, R> where
T: 'a + Send + Sync,
R: RawAsyncRwLock + 'a + Send + Sync,
[src]fn read_async<'async_trait>(
&'a self
) -> Pin<Box<dyn Future<Output = Self::ReadGuard> + Send + 'async_trait>> where
'a: 'async_trait,
Self: 'async_trait,
[src]
&'a self
) -> Pin<Box<dyn Future<Output = Self::ReadGuard> + Send + 'async_trait>> where
'a: 'async_trait,
Self: 'async_trait,
fn write_async<'async_trait>(
&'a self
) -> Pin<Box<dyn Future<Output = Self::WriteGuard> + Send + 'async_trait>> where
'a: 'async_trait,
Self: 'async_trait,
[src]
&'a self
) -> Pin<Box<dyn Future<Output = Self::WriteGuard> + Send + 'async_trait>> where
'a: 'async_trait,
Self: 'async_trait,