Struct thruster::MiddlewareChain[][src]

pub struct MiddlewareChain<'a, T: 'a + Context> {
    pub middleware: &'a Vec<Middleware<T>>,
    pub not_found: &'a Vec<Middleware<T>>,
    // some fields omitted
}

The MiddlewareChain represents a chain of futures that is every piece of middleware following the current one. If you wish to not continue down the chain, simply do not call chain.next, otherwise, you can call it and wait for the return value of the future and proceed with work accordingly.

Fields

Methods

impl<'a, T: 'static + Context + Send> MiddlewareChain<'a, T>
[src]

Create a new MiddlewareChain with a vector of middleware to be executed.

Auto Trait Implementations

impl<'a, T> Send for MiddlewareChain<'a, T>

impl<'a, T> !Sync for MiddlewareChain<'a, T>