[−][src]Struct vtable::VWeak
Weak pointer for the VRc
where VTable
is a VTable struct, and
X
is the type of the instance, or Dyn
if it is not known
Similar to std::rc::Weak
.
Can be constructed with VRc::downgrade
and use VWeak::upgrade
to re-create the original VRc.
Implementations
impl<VTable: VTableMetaDropInPlace + 'static, X> VWeak<VTable, X>
[src]
pub fn upgrade(&self) -> Option<VRc<VTable, X>>
[src]
Returns a new VRc
if some other instance still holds a strong reference to this item.
Otherwise, returns None.
impl<VTable: VTableMetaDropInPlace + 'static, X: HasStaticVTable<VTable> + 'static> VWeak<VTable, X>
[src]
pub fn into_dyn(self) -> VWeak<VTable, Dyn>
[src]
Convert a VRc of a real instance to a VRc of a Dyn instance
Trait Implementations
impl<VTable: VTableMetaDropInPlace + 'static, X> Clone for VWeak<VTable, X>
[src]
pub fn clone(&self) -> Self
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl<VTable: VTableMetaDropInPlace + 'static, X> Default for VWeak<VTable, X>
[src]
impl<T: VTableMetaDropInPlace + 'static, X> Drop for VWeak<T, X>
[src]
Auto Trait Implementations
impl<VTable, X = Dyn> !RefUnwindSafe for VWeak<VTable, X>
impl<VTable, X = Dyn> !Send for VWeak<VTable, X>
impl<VTable, X = Dyn> !Sync for VWeak<VTable, X>
impl<VTable, X> Unpin for VWeak<VTable, X>
impl<VTable, X = Dyn> !UnwindSafe for VWeak<VTable, X>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,