pub struct Weak<T: ?Sized + Trace + 'static> { /* private fields */ }Available on crate feature 
weak-ptr only.Expand description
A non-owning pointer to the managed allocation.
Implementations§
source§impl<T: ?Sized + Trace + 'static> Weak<T>
 
impl<T: ?Sized + Trace + 'static> Weak<T>
sourcepub fn ptr_eq(this: &Weak<T>, other: &Weak<T>) -> bool
 
pub fn ptr_eq(this: &Weak<T>, other: &Weak<T>) -> bool
Returns true if the two Weaks point to the same allocation. This function ignores the metadata of dyn Trait pointers.
sourcepub fn strong_count(&self) -> u32
 
pub fn strong_count(&self) -> u32
Returns the number of Ccs to the pointed allocation.
sourcepub fn weak_count(&self) -> u32
 
pub fn weak_count(&self) -> u32
Returns the number of Weaks to the pointed allocation.
Trait Implementations§
source§impl<T: ?Sized + Trace + 'static> Clone for Weak<T>
 
impl<T: ?Sized + Trace + 'static> Clone for Weak<T>
impl<T, U> CoerceUnsized<Weak<U>> for Weak<T>
Available on crate feature 
nightly only.Auto Trait Implementations§
impl<T> Freeze for Weak<T>where
    T: ?Sized,
impl<T> !RefUnwindSafe for Weak<T>
impl<T> !Send for Weak<T>
impl<T> !Sync for Weak<T>
impl<T> Unpin for Weak<T>where
    T: ?Sized,
impl<T> !UnwindSafe for Weak<T>
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
source§impl<T> CloneToUninit for Twhere
    T: Clone,
 
impl<T> CloneToUninit for Twhere
    T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
 
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit)