pub struct SemaphoreGuard<'a> { /* private fields */ }
Expand description

An RAII guard which will release a resource acquired from a semaphore when dropped.

Methods from Deref<Target = Semaphore>

Set the semaphore in removed statue

Acquires a resource of this semaphore, blocking the current thread until it can do so.

This method will block until the internal count of the semaphore is at least 1.

Release a resource from this semaphore.

This will increment the number of resources in this semaphore by 1 and will notify any pending waiters in acquire or access if necessary.

Acquires a resource of this semaphore, returning an RAII guard to release the semaphore when dropped.

This function is semantically equivalent to an acquire followed by a release when the guard returned is dropped.

Get the current count

Get the current eventbus callback length

Get the current pid

Set the current pid

Set the current count

Trait Implementations

The resulting type after dereferencing.

Dereferences the value.

Executes the destructor for this type. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Casts the value.

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Casts the value.

Casts the value.

Casts the value.

Convert Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can then be further downcast into Box<ConcreteType> where ConcreteType implements Trait. Read more

Convert Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be further downcast into Rc<ConcreteType> where ConcreteType implements Trait. Read more

Convert &Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &Any’s vtable from &Trait’s. Read more

Convert &mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &mut Any’s vtable from &mut Trait’s. Read more

Convert Arc<Trait> (where Trait: Downcast) to Arc<Any>. Arc<Any> can then be further downcast into Arc<ConcreteType> where ConcreteType implements Trait. Read more

Returns the argument unchanged.

Calls U::from(self).

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

Performs the conversion.

Casts the value.

Casts the value.

Casts the value.

Casts the value.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

Casts the value.

Casts the value.

Casts the value.

Casts the value.