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", so this trait is not object safe.

Implementors§