Struct jrsonnet_gcmodule::RawWeak
source · pub struct RawWeak<T: ?Sized, O: AbstractObjectSpace>(/* private fields */);
Expand description
Low-level type for Weak<T>
.
Implementations§
source§impl<T: ?Sized, O: AbstractObjectSpace> RawWeak<T, O>
impl<T: ?Sized, O: AbstractObjectSpace> RawWeak<T, O>
sourcepub fn upgrade(&self) -> Option<RawCc<T, O>>
pub fn upgrade(&self) -> Option<RawCc<T, O>>
Attempts to obtain a “strong reference”.
Returns None
if the value has already been dropped.
sourcepub fn strong_count(&self) -> usize
pub fn strong_count(&self) -> usize
Gets the reference count not considering weak references.
sourcepub fn weak_count(&self) -> usize
pub fn weak_count(&self) -> usize
Get the weak (non-owning) reference count.
Trait Implementations§
impl<T: UnwindSafe + ?Sized, O: AbstractObjectSpace> UnwindSafe for RawWeak<T, O>
Auto Trait Implementations§
impl<T, O> Freeze for RawWeak<T, O>where
T: ?Sized,
impl<T, O> !RefUnwindSafe for RawWeak<T, O>
impl<T, O> !Send for RawWeak<T, O>
impl<T, O> !Sync for RawWeak<T, O>
impl<T, O> Unpin for RawWeak<T, O>where
T: ?Sized,
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