[][src]Struct futures_intrusive::sync::GenericSemaphoreReleaser

pub struct GenericSemaphoreReleaser<'a, MutexType: RawMutex> { /* fields omitted */ }

An RAII guard returned by the acquire and try_acquire methods.

When this structure is dropped (falls out of scope), the amount of permits that was used in the acquire() call will be released back to the Semaphore.

Methods

impl<'_, MutexType: RawMutex> GenericSemaphoreReleaser<'_, MutexType>[src]

pub fn disarm(&mut self) -> usize[src]

Prevents the SemaphoreReleaser from automatically releasing the permits when it gets dropped. This is helpful if the permits must be acquired for a longer lifetime than the one of the SemaphoreReleaser. If this method is used it is important to release the acquired permits manually back to the Semaphore.

Trait Implementations

impl<'_, MutexType: RawMutex> Debug for GenericSemaphoreReleaser<'_, MutexType>[src]

impl<'_, MutexType: RawMutex> Drop for GenericSemaphoreReleaser<'_, MutexType>[src]

Auto Trait Implementations

impl<'a, MutexType> !RefUnwindSafe for GenericSemaphoreReleaser<'a, MutexType>

impl<'a, MutexType> Send for GenericSemaphoreReleaser<'a, MutexType> where
    MutexType: Sync

impl<'a, MutexType> Sync for GenericSemaphoreReleaser<'a, MutexType> where
    MutexType: Sync

impl<'a, MutexType> Unpin for GenericSemaphoreReleaser<'a, MutexType>

impl<'a, MutexType> !UnwindSafe for GenericSemaphoreReleaser<'a, MutexType>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.