pub struct ThreadCounter { /* private fields */ }
Trait Implementations§
Source§impl Counter for ThreadCounter
impl Counter for ThreadCounter
Source§fn strong_count(&self) -> usize
fn strong_count(&self) -> usize
Get the strong reference count
Source§fn weak_count(&self) -> usize
fn weak_count(&self) -> usize
Get the weak reference count Read more
Source§fn inc_strong_for_new_ref(&self)
fn inc_strong_for_new_ref(&self)
Increment the strong count for creation of a new strong reference
Source§fn dec_strong_for_drop(&self) -> bool
fn dec_strong_for_drop(&self) -> bool
Decrements the strong count for dropping a reference, returning
true
if there are no more strong pointers left (and the value and items in
the slice should be dropped)Source§fn inc_weak_for_new_ref(&self)
fn inc_weak_for_new_ref(&self)
Increments the weak count for creation of a new weak reference
Source§fn dec_weak_for_drop(&self) -> bool
fn dec_weak_for_drop(&self) -> bool
Decrements the weak count for dropping a reference, returning
true
if there are no more weak pointers left (and the allocation should be
deallocated)Source§fn try_inc_strong_for_upgrade(&self) -> bool
fn try_inc_strong_for_upgrade(&self) -> bool
Increment the strong count if it is possible to upgrade a weak pointer
to strong, and return
true
, otherwise return false
and do nothingAuto Trait Implementations§
impl !Freeze for ThreadCounter
impl !RefUnwindSafe for ThreadCounter
impl !Send for ThreadCounter
impl !Sync for ThreadCounter
impl Unpin for ThreadCounter
impl UnwindSafe for ThreadCounter
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more