Skip to main content

TypedComponentInstanceProvider

Trait TypedComponentInstanceProvider 

Source
pub trait TypedComponentInstanceProvider {
    // Required methods
    fn primary_instance_typed<T: Injectable + ?Sized>(
        &mut self,
    ) -> Result<ComponentInstancePtr<T>, ComponentInstanceProviderError>;
    fn primary_instance_option<T: Injectable + ?Sized>(
        &mut self,
    ) -> Result<Option<ComponentInstancePtr<T>>, ComponentInstanceProviderError>;
    fn instances_typed<T: Injectable + ?Sized>(
        &mut self,
    ) -> Result<Vec<ComponentInstancePtr<T>>, ComponentInstanceProviderError>;
    fn instance_by_name_typed<T: Injectable + ?Sized>(
        &mut self,
        name: &str,
    ) -> Result<ComponentInstancePtr<T>, ComponentInstanceProviderError>;
    fn instance_by_name_option<T: Injectable + ?Sized>(
        &mut self,
        name: &str,
    ) -> Result<Option<ComponentInstancePtr<T>>, ComponentInstanceProviderError>;
}
Expand description

Helper trait for ComponentInstanceProvider providing strongly-typed access.

Required Methods§

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementors§

Source§

impl<CIP: ComponentInstanceProvider + ?Sized> TypedComponentInstanceProvider for CIP

Available on non-crate feature async only.