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]

[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]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl<T: Sized> Deref for Guard<T>
[src]

The resulting type after dereferencing.

[src]

Dereferences the value.