Trait viz_core::Middleware[][src]

pub trait Middleware<'a, Context>: Send + Sync + 'static {
    type Output;
#[must_use]    pub fn call(
        &'a self,
        cx: &'a mut Context
    ) -> Pin<Box<dyn Future<Output = Self::Output> + 'a + Send, Global>>; }

A handle trait for asynchronous context pipeline.

Associated Types

type Output[src]

Returns Output

Loading content...

Required methods

#[must_use]pub fn call(
    &'a self,
    cx: &'a mut Context
) -> Pin<Box<dyn Future<Output = Self::Output> + 'a + Send, Global>>
[src]

Invokes the handler within the given Context and then returns Output

Loading content...

Implementors

impl<'a, Context, Output, F, Fut> Handle<'a, Context> for F where
    Context: 'a,
    F: Send + Sync + 'static + Fn(&'a mut Context) -> Fut,
    Fut: Future<Output = Output> + Send + 'a, 
[src]

type Output = Output

impl<'a, F, T> Handle<'a, Context> for HandlerSuper<F, T> where
    F: for<'h> HandlerCamp<'h, T> + Send + Sync + 'static,
    T: Extract + Send + Sync + 'static,
    T::Error: Into<Response> + Send
[src]

type Output = Result<Response>

impl<'a, F, T> Handle<'a, Context> for HandlerWrapper<F, T> where
    F: HandlerBase<T> + Send + Sync + 'static,
    T: Extract + Send + Sync + 'static,
    T::Error: Into<Response> + Send
[src]

type Output = Result<Response>

Loading content...