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.
Source§impl<C: ComponentInstanceInterface + 'static> From<WeakExtendedInstanceInterface<C>> for WeakInstanceToken
impl<C: ComponentInstanceInterface + 'static> From<WeakExtendedInstanceInterface<C>> for WeakInstanceToken
Source§fn from(instance: WeakExtendedInstanceInterface<C>) -> Self
fn from(instance: WeakExtendedInstanceInterface<C>) -> Self
Converts to this type from the input type.
Source§impl<C: ComponentInstanceInterface + 'static> TryFrom<WeakInstanceToken> for WeakExtendedInstanceInterface<C>
impl<C: ComponentInstanceInterface + 'static> TryFrom<WeakInstanceToken> for WeakExtendedInstanceInterface<C>
Source§impl<C: ComponentInstanceInterface + 'static> WeakInstanceTokenAny for WeakExtendedInstanceInterface<C>
impl<C: ComponentInstanceInterface + 'static> WeakInstanceTokenAny for WeakExtendedInstanceInterface<C>
Auto Trait Implementations§
impl<C> Freeze for WeakExtendedInstanceInterface<C>
impl<C> RefUnwindSafe for WeakExtendedInstanceInterface<C>
impl<C> Send for WeakExtendedInstanceInterface<C>
impl<C> Sync for WeakExtendedInstanceInterface<C>
impl<C> Unpin for WeakExtendedInstanceInterface<C>
impl<C> UnwindSafe for WeakExtendedInstanceInterface<C>
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§impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
Source§impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more