Struct raii_counter::WeakCounter
[−]
[src]
pub struct WeakCounter(_);
This is a 'weak' reference to the Counter, so it will not affect the count
Methods
impl WeakCounter
[src]
pub fn count(&self) -> usize
[src]
This method is inherently racey. Assume the count will have changed once the value is observed.
pub fn upgrade(self) -> Counter
[src]
Consumes self, becomes a Counter
pub fn spawn_upgrade(&self) -> Counter
[src]
Instead of clone + upgrade, this will only clone once
Trait Implementations
impl Clone for WeakCounter
[src]
fn clone(&self) -> WeakCounter
[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