Skip to main content

FromModuleRef

Trait FromModuleRef 

Source
pub trait FromModuleRef:
    Sized
    + Send
    + Sync
    + 'static {
    // Required method
    fn from_module_ref(module_ref: &ModuleRef) -> Result<Self>;

    // Provided method
    fn provider_dependencies() -> Option<Vec<ProviderDependency>> { ... }
}
Expand description

Builds an injectable value from the module provider graph.

Required Methods§

Source

fn from_module_ref(module_ref: &ModuleRef) -> Result<Self>

Provided Methods§

Source

fn provider_dependencies() -> Option<Vec<ProviderDependency>>

Dependencies captured while constructing this provider.

#[injectable] implements this automatically. Manual implementations can return None when the dependency graph is opaque.

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementors§