pub trait WeakInstanceTokenExt<C: ComponentInstanceInterface + 'static> {
// Required methods
fn to_instance(self) -> WeakExtendedInstanceInterface<C>;
fn as_ref(&self) -> &WeakExtendedInstanceInterface<C>;
fn upgrade(
&self,
) -> Result<ExtendedInstanceInterface<C>, ComponentInstanceError>;
fn moniker(&self) -> ExtendedMoniker;
}
Expand description
A trait to add functions WeakComponentInstancethat know about the component manager types.
Required Methods§
Sourcefn to_instance(self) -> WeakExtendedInstanceInterface<C>
fn to_instance(self) -> WeakExtendedInstanceInterface<C>
Upgrade this token to the underlying instance.
Sourcefn as_ref(&self) -> &WeakExtendedInstanceInterface<C>
fn as_ref(&self) -> &WeakExtendedInstanceInterface<C>
Get a reference to the underlying instance.
Sourcefn upgrade(
&self,
) -> Result<ExtendedInstanceInterface<C>, ComponentInstanceError>
fn upgrade( &self, ) -> Result<ExtendedInstanceInterface<C>, ComponentInstanceError>
Get a strong reference to the underlying instance.
Sourcefn moniker(&self) -> ExtendedMoniker
fn moniker(&self) -> ExtendedMoniker
Get the moniker for this component.