[][src]Trait nuclear_router::Handler

pub trait Handler {
    fn call(
        &self,
        req: Request<Body>,
        params: OwnedCaptures
    ) -> Pin<Box<dyn Future<Output = Result<Response<Body>, Box<dyn StdError + Send + Sync>>> + Send + 'static>>; }

Required methods

fn call(
    &self,
    req: Request<Body>,
    params: OwnedCaptures
) -> Pin<Box<dyn Future<Output = Result<Response<Body>, Box<dyn StdError + Send + Sync>>> + Send + 'static>>

Loading content...

Implementations on Foreign Types

impl Handler for Box<dyn Handler + Send + Sync>[src]

Loading content...

Implementors

impl<F, E, Fut> Handler for F where
    F: Fn(Request<Body>, OwnedCaptures) -> Fut,
    E: StdError + Send + Sync + 'static,
    Fut: Future<Output = Result<Response<Body>, E>> + Send + 'static, 
[src]

Loading content...