routing::bedrock::weak_instance_token_ext

Trait WeakInstanceTokenExt

Source
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§

Source

fn to_instance(self) -> WeakExtendedInstanceInterface<C>

Upgrade this token to the underlying instance.

Source

fn as_ref(&self) -> &WeakExtendedInstanceInterface<C>

Get a reference to the underlying instance.

Source

fn upgrade( &self, ) -> Result<ExtendedInstanceInterface<C>, ComponentInstanceError>

Get a strong reference to the underlying instance.

Source

fn moniker(&self) -> ExtendedMoniker

Get the moniker for this component.

Implementations on Foreign Types§

Source§

impl<C: ComponentInstanceInterface + 'static> WeakInstanceTokenExt<C> for WeakInstanceToken

Implementors§