[][src]Trait roa_core::Handler

pub trait Handler<M: Model, R = ()>: 'static + Sync + Send {
    type StatusFuture: 'static + Future<Output = Result<R, Status>> + Send;
    fn handle(&self, ctx: Context<M>) -> Self::StatusFuture;

    fn dynamic(self: Box<Self>) -> Box<DynHandler<M, R>> { ... }
}

Associated Types

type StatusFuture: 'static + Future<Output = Result<R, Status>> + Send

Loading content...

Required methods

fn handle(&self, ctx: Context<M>) -> Self::StatusFuture

Loading content...

Provided methods

fn dynamic(self: Box<Self>) -> Box<DynHandler<M, R>>

Loading content...

Implementors

impl<M, R, F, T> Handler<M, R> for T where
    M: Model,
    F: 'static + Future<Output = Result<R, Status>> + Send,
    T: 'static + Sync + Send + Fn(Context<M>) -> F, 
[src]

type StatusFuture = F

Loading content...