Skip to main content

CanHandle

Trait CanHandle 

Source
pub trait CanHandle<Code, Input>: HasErrorType {
    type Output;

    // Required method
    fn handle(
        &self,
        _tag: PhantomData<Code>,
        input: Input,
    ) -> impl Future<Output = Result<Self::Output, Self::Error>>;
}

Required Associated Types§

Required Methods§

Source

fn handle( &self, _tag: PhantomData<Code>, input: Input, ) -> impl Future<Output = Result<Self::Output, Self::Error>>

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§

Source§

impl<__Context__, Code, Input> CanHandle<Code, Input> for __Context__
where __Context__: HasErrorType + Handler<__Context__, Code, Input>,

Source§

type Output = <__Context__ as Handler<__Context__, Code, Input>>::Output