pub struct AsyncRwLockWriteFuture<ST: SyncTypes, T: Send + Sync, LP: SyncRcPtr<AsyncRwLock<ST, T>>> { /* private fields */ }Expand description
Asynchronous wait for exclusive locking of an AsyncRwLock.
To be obtained through AsyncRwLock::write().
§Note on lifetime management
An AsyncRwLockWriteFuture instance will only maintain a weak reference
(i.e. a WeakSyncRcPtr) to the associated
AsyncRwLock instance and thus, would not hinder its deallocation. In
case the lock gets dropped before the future had a chance to acquire it, its
poll() would return AsyncRwLockError::StaleRwLock.
Implementations§
Source§impl<ST: SyncTypes, T: Send + Sync, LP: SyncRcPtr<AsyncRwLock<ST, T>>> AsyncRwLockWriteFuture<ST, T, LP>
impl<ST: SyncTypes, T: Send + Sync, LP: SyncRcPtr<AsyncRwLock<ST, T>>> AsyncRwLockWriteFuture<ST, T, LP>
pub fn get_rwlock(&self) -> Option<LP>
Trait Implementations§
Source§impl<ST: SyncTypes, T: Send + Sync, LP: SyncRcPtr<AsyncRwLock<ST, T>>> Future for AsyncRwLockWriteFuture<ST, T, LP>
impl<ST: SyncTypes, T: Send + Sync, LP: SyncRcPtr<AsyncRwLock<ST, T>>> Future for AsyncRwLockWriteFuture<ST, T, LP>
Source§fn poll(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Self::Output>
fn poll(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Self::Output>
Poll for a locking grant of the associated AsyncRwLock.
Upon future completion, either a AsyncRwLockWriteGuard is returned
or, if the associated AsyncRwLock had been dropped in the
meanwhile, an error of AsyncRwLockError::StaleRwLock.
The future must not get polled any further once completed.
Source§type Output = Result<AsyncRwLockWriteGuard<ST, T, LP>, AsyncRwLockError>
type Output = Result<AsyncRwLockWriteGuard<ST, T, LP>, AsyncRwLockError>
The type of value produced on completion.
impl<ST: SyncTypes, T: Send + Sync, LP: SyncRcPtr<AsyncRwLock<ST, T>>> Unpin for AsyncRwLockWriteFuture<ST, T, LP>
Auto Trait Implementations§
impl<ST, T, LP> Freeze for AsyncRwLockWriteFuture<ST, T, LP>where
AsyncSemaphoreExclusiveAllFuture<ST, T, SyncRcPtrForInner<AsyncRwLock<ST, T>, LP, AsyncRwLockIndexInnerSemTag>>: Freeze,
impl<ST, T, LP> RefUnwindSafe for AsyncRwLockWriteFuture<ST, T, LP>where
AsyncSemaphoreExclusiveAllFuture<ST, T, SyncRcPtrForInner<AsyncRwLock<ST, T>, LP, AsyncRwLockIndexInnerSemTag>>: RefUnwindSafe,
impl<ST, T, LP> Send for AsyncRwLockWriteFuture<ST, T, LP>where
AsyncSemaphoreExclusiveAllFuture<ST, T, SyncRcPtrForInner<AsyncRwLock<ST, T>, LP, AsyncRwLockIndexInnerSemTag>>: Send,
impl<ST, T, LP> Sync for AsyncRwLockWriteFuture<ST, T, LP>where
AsyncSemaphoreExclusiveAllFuture<ST, T, SyncRcPtrForInner<AsyncRwLock<ST, T>, LP, AsyncRwLockIndexInnerSemTag>>: Sync,
impl<ST, T, LP> UnsafeUnpin for AsyncRwLockWriteFuture<ST, T, LP>where
AsyncSemaphoreExclusiveAllFuture<ST, T, SyncRcPtrForInner<AsyncRwLock<ST, T>, LP, AsyncRwLockIndexInnerSemTag>>: UnsafeUnpin,
impl<ST, T, LP> UnwindSafe for AsyncRwLockWriteFuture<ST, T, LP>where
AsyncSemaphoreExclusiveAllFuture<ST, T, SyncRcPtrForInner<AsyncRwLock<ST, T>, LP, AsyncRwLockIndexInnerSemTag>>: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<F> IntoFuture for Fwhere
F: Future,
impl<F> IntoFuture for Fwhere
F: Future,
Source§type IntoFuture = F
type IntoFuture = F
Which kind of future are we turning this into?
Source§fn into_future(self) -> <F as IntoFuture>::IntoFuture
fn into_future(self) -> <F as IntoFuture>::IntoFuture
Creates a future from a value. Read more