A 'weak' Counter that does not affect the count.
pub fn new() -> WeakCounter[src]
This method is inherently racey. Assume the count will have changed once the value is observed.
Consumes self, becomes a Counter
pub fn spawn_upgrade(&self) -> Counter[src]
Instead of clone + upgrade, this will only clone once Defaults to a Counter of size 1
pub fn spawn_upgrade_with_size(&self, size: usize) -> Counter[src]
Instead of clone + upgrade, this will only clone once
pub async fn wait_for_empty<'_>(&'_ self)[src]
Returns a future that waits until the counter contains a 0 value
impl Clone for WeakCounter[src]
impl Debug for WeakCounter[src]
impl Display for WeakCounter[src]
impl !RefUnwindSafe for WeakCounter
impl Send for WeakCounter
impl Sync for WeakCounter
impl Unpin for WeakCounter
impl !UnwindSafe for WeakCounter
type Owned = T
The resulting type after obtaining ownership.
fn clone_into(&self, target: &mut T)[src]
type Error = Infallible
The type returned in the event of a conversion error.