[][src]Trait roa_core::TargetHandler

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

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

Associated Types

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

Loading content...

Required methods

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

Loading content...

Provided methods

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

Loading content...

Implementors

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

type StatusFuture = F

Loading content...