Struct semaphore::Guard
[−]
[src]
pub struct Guard<T> { /* fields omitted */ }
An RAII guard used to release access to the semaphore automatically when it falls out of scope.
Guards can be cloned, in which case the original guard and all descendent guards need to go out of scope for the single access to be released on the semaphore.
Methods
impl<T> Guard<T>
[src]
fn as_unguarded(&self) -> UnguardedRef<T>
[src]
Deprecated since 0.2.1
: please use Guard::clone
instead
Spawns an unguarded reference to the resource.
Trait Implementations
impl<T> Clone for Guard<T>
[src]
fn clone(&self) -> Guard<T>
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more