Skip to main content

WeakInstanceTokenExt

Trait WeakInstanceTokenExt 

Source
pub trait WeakInstanceTokenExt<C: ComponentInstanceInterface + 'static> {
    // Required methods
    fn to_instance(self) -> WeakExtendedInstanceInterface<C>;
    fn as_instance_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_instance_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.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

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

Implementors§