Trait AutoRegister

Source
pub trait AutoRegister {
    type Out;

    // Required method
    fn register_instance<'life0, 'async_trait>(
        self,
        runtime: &'life0 Runtime,
    ) -> Pin<Box<dyn Future<Output = Self::Out> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}

Required Associated Types§

Required Methods§

Source

fn register_instance<'life0, 'async_trait>( self, runtime: &'life0 Runtime, ) -> Pin<Box<dyn Future<Output = Self::Out> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Implementations on Foreign Types§

Source§

impl<T> AutoRegister for Option<T>
where T: AutoRegister + Send,

Source§

type Out = Option<<T as AutoRegister>::Out>

Source§

fn register_instance<'life0, 'async_trait>( self, runtime: &'life0 Runtime, ) -> Pin<Box<dyn Future<Output = Self::Out> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

impl<T, E> AutoRegister for Result<T, E>
where T: AutoRegister + Send, E: Send,

Source§

type Out = Result<<T as AutoRegister>::Out, E>

Source§

fn register_instance<'life0, 'async_trait>( self, runtime: &'life0 Runtime, ) -> Pin<Box<dyn Future<Output = Self::Out> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Implementors§

Source§

impl<T> AutoRegister for T
where T: Identity + Send + 'static,