Injectable

Trait Injectable 

Source
pub trait Injectable: Sync + Send {
    type Error: Error + Send + Sync + 'static;

    // Required method
    fn create(
        injector: Injector,
    ) -> impl Future<Output = Result<Self, Self::Error>> + Sync + Send
       where Self: Sized;
}

Required Associated Types§

Source

type Error: Error + Send + Sync + 'static

Required Methods§

Source

fn create( injector: Injector, ) -> impl Future<Output = Result<Self, Self::Error>> + Sync + Send
where Self: Sized,

Implementors§

Source§

impl<T> Injectable for T
where T: Default + Send + Sync + 'static,