[][src]Struct iron::middleware::Chain

pub struct Chain { /* fields omitted */ }

The middleware chain used in Iron.

This is a canonical implementation of Iron's middleware system, but Iron's infrastructure is flexible enough to allow alternate systems.

Methods

impl Chain[src]

pub fn new<H: Handler>(handler: H) -> Chain[src]

Construct a new ChainBuilder from a Handler.

Link both a before and after middleware to the chain at once.

Middleware that have a Before and After piece should have a constructor which returns both as a tuple, so it can be passed directly to link.

Link a BeforeMiddleware to the Chain, after all previously linked BeforeMiddleware.

Link a AfterMiddleware to the Chain, after all previously linked AfterMiddleware.

pub fn around<A>(&mut self, around: A) -> &mut Chain where
    A: AroundMiddleware
[src]

Apply an AroundMiddleware to the Handler in this Chain.

Note: This function is being renamed link_around(), and will eventually be removed.

Apply an AroundMiddleware to the Handler in this Chain.

Trait Implementations

impl Handler for Chain[src]

Auto Trait Implementations

impl Unpin for Chain

impl Sync for Chain

impl Send for Chain

impl !UnwindSafe for Chain

impl !RefUnwindSafe for Chain

Blanket Implementations

impl<F> Handler for F where
    F: Send + Sync + 'static + Fn(&mut Request) -> Result<Response, IronError>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Typeable for T where
    T: Any

fn get_type(&self) -> TypeId

Get the TypeId of this object.

impl<T> UnsafeAny for T where
    T: Any