pub enum WeakExtendedInstanceInterface<C: ComponentInstanceInterface> {
Component(WeakComponentInstanceInterface<C>),
AboveRoot(Weak<C::TopInstance>),
}
Expand description
A type implementing ComponentInstanceInterface
or its TopInstance
, as a weak pointer.
Variants§
Component(WeakComponentInstanceInterface<C>)
AboveRoot(Weak<C::TopInstance>)
Implementations§
source§impl<C: ComponentInstanceInterface> WeakExtendedInstanceInterface<C>
impl<C: ComponentInstanceInterface> WeakExtendedInstanceInterface<C>
sourcepub fn upgrade(
&self
) -> Result<ExtendedInstanceInterface<C>, ComponentInstanceError>
pub fn upgrade( &self ) -> Result<ExtendedInstanceInterface<C>, ComponentInstanceError>
Attempts to upgrade this WeakExtendedInstanceInterface<C>
into an
ExtendedInstanceInterface<C>
, if the original extended instance has not been destroyed.
pub fn extended_moniker(&self) -> ExtendedMoniker
Trait Implementations§
source§impl<C: ComponentInstanceInterface> Clone for WeakExtendedInstanceInterface<C>
impl<C: ComponentInstanceInterface> Clone for WeakExtendedInstanceInterface<C>
source§impl<C: ComponentInstanceInterface> Debug for WeakExtendedInstanceInterface<C>
impl<C: ComponentInstanceInterface> Debug for WeakExtendedInstanceInterface<C>
source§impl<C: ComponentInstanceInterface> From<&ExtendedInstanceInterface<C>> for WeakExtendedInstanceInterface<C>
impl<C: ComponentInstanceInterface> From<&ExtendedInstanceInterface<C>> for WeakExtendedInstanceInterface<C>
source§fn from(extended: &ExtendedInstanceInterface<C>) -> Self
fn from(extended: &ExtendedInstanceInterface<C>) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl<C> Freeze for WeakExtendedInstanceInterface<C>
impl<C> RefUnwindSafe for WeakExtendedInstanceInterface<C>where
C: Sync + Send + RefUnwindSafe,
<C as ComponentInstanceInterface>::TopInstance: RefUnwindSafe,
impl<C> Send for WeakExtendedInstanceInterface<C>
impl<C> Sync for WeakExtendedInstanceInterface<C>
impl<C> Unpin for WeakExtendedInstanceInterface<C>
impl<C> UnwindSafe for WeakExtendedInstanceInterface<C>where
C: Sync + Send + RefUnwindSafe,
<C as ComponentInstanceInterface>::TopInstance: RefUnwindSafe,
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