Skip to main content

Build

Trait Build 

Source
pub trait Build:
    Clone
    + Send
    + Sync
    + 'static {
    // Required method
    fn build(state: &State) -> Result<Self, DependencyInjectionError>
       where Self: Sized;
}
Expand description

Base trait for any component that can be constructed from the application State.

Required Methods§

Source

fn build(state: &State) -> Result<Self, DependencyInjectionError>
where Self: Sized,

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementors§