[][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, '_> Drop for GenericSemaphoreReleaser<'_, MutexType>[src]

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

Auto Trait Implementations

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

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

Blanket Implementations

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.

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

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

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