[−][src]Struct futures_intrusive::sync::GenericSemaphoreReleaser
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,
MutexType: Sync,
impl<'a, MutexType> Sync for GenericSemaphoreReleaser<'a, MutexType> where
MutexType: Sync,
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]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,