pub trait Handler<C>: Send
where C: Connection,
{ type Error: Debug; // Required method fn handle(&self, connection: &mut C) -> Result<(), Self::Error>; }

Required Associated Types§

source

type Error: Debug

Required Methods§

source

fn handle(&self, connection: &mut C) -> Result<(), Self::Error>

Implementations on Foreign Types§

source§

impl<C, H> Handler<C> for &H
where C: Connection, H: Handler<C> + Send + Sync,

§

type Error = <H as Handler<C>>::Error

source§

fn handle(&self, connection: &mut C) -> Result<(), <&H as Handler<C>>::Error>

Implementors§

source§

impl<C, F, E> Handler<C> for FnHandler<F>
where C: Connection, F: Fn(Request<&mut C>) -> Result<(), E> + Send, E: Debug,

§

type Error = E

source§

impl<M, H, C> Handler<C> for CompositeHandler<M, H>
where M: Middleware<C, H>, H: Handler<C>, C: Connection,

§

type Error = <M as Middleware<C, H>>::Error