Skip to main content

AsyncRwLockWriteWeakGuard

Struct AsyncRwLockWriteWeakGuard 

Source
pub struct AsyncRwLockWriteWeakGuard<ST: SyncTypes, T: Send + Sync, LP: SyncRcPtr<AsyncRwLock<ST, T>>> { /* private fields */ }
Expand description

Weak variant of AsyncRwLockWriteGuard not hindering destruction of the associated AsyncRwLock.

In cases were it’s desired that long-living locking grants don’t prevent a destruction of the associated AsyncRwLock, or to break cycles, a AsyncRwLockWriteWeakGuard may be used. To be obtained via AsyncRwLockWriteGuard::into_weak().

An AsyncRwLockWriteWeakGuard may get converted back into a full AsyncRwLockWriteGuard via upgrade().

Implementations§

Source§

impl<ST: SyncTypes, T: Send + Sync, LP: SyncRcPtr<AsyncRwLock<ST, T>>> AsyncRwLockWriteWeakGuard<ST, T, LP>

Source

pub fn upgrade(self) -> Option<AsyncRwLockWriteGuard<ST, T, LP>>

Attempt to convert back into an AsyncRwLockWriteGuard.

Returns the AsyncRwLockWriteGuard wrapped in Some if the associated AsyncRwLock is still alive, `None otherwise.

Auto Trait Implementations§

§

impl<ST, T, LP> Freeze for AsyncRwLockWriteWeakGuard<ST, T, LP>
where AsyncSemaphoreExclusiveAllWeakGuard<ST, T, SyncRcPtrForInner<AsyncRwLock<ST, T>, LP, AsyncRwLockIndexInnerSemTag>>: Freeze,

§

impl<ST, T, LP> RefUnwindSafe for AsyncRwLockWriteWeakGuard<ST, T, LP>
where AsyncSemaphoreExclusiveAllWeakGuard<ST, T, SyncRcPtrForInner<AsyncRwLock<ST, T>, LP, AsyncRwLockIndexInnerSemTag>>: RefUnwindSafe,

§

impl<ST, T, LP> Send for AsyncRwLockWriteWeakGuard<ST, T, LP>
where AsyncSemaphoreExclusiveAllWeakGuard<ST, T, SyncRcPtrForInner<AsyncRwLock<ST, T>, LP, AsyncRwLockIndexInnerSemTag>>: Send,

§

impl<ST, T, LP> Sync for AsyncRwLockWriteWeakGuard<ST, T, LP>
where AsyncSemaphoreExclusiveAllWeakGuard<ST, T, SyncRcPtrForInner<AsyncRwLock<ST, T>, LP, AsyncRwLockIndexInnerSemTag>>: Sync,

§

impl<ST, T, LP> Unpin for AsyncRwLockWriteWeakGuard<ST, T, LP>
where AsyncSemaphoreExclusiveAllWeakGuard<ST, T, SyncRcPtrForInner<AsyncRwLock<ST, T>, LP, AsyncRwLockIndexInnerSemTag>>: Unpin,

§

impl<ST, T, LP> UnsafeUnpin for AsyncRwLockWriteWeakGuard<ST, T, LP>
where AsyncSemaphoreExclusiveAllWeakGuard<ST, T, SyncRcPtrForInner<AsyncRwLock<ST, T>, LP, AsyncRwLockIndexInnerSemTag>>: UnsafeUnpin,

§

impl<ST, T, LP> UnwindSafe for AsyncRwLockWriteWeakGuard<ST, T, LP>
where AsyncSemaphoreExclusiveAllWeakGuard<ST, T, SyncRcPtrForInner<AsyncRwLock<ST, T>, LP, AsyncRwLockIndexInnerSemTag>>: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.