fn fail_from_before(&self, req: &mut Request, index: usize,
                        mut err: IronError) -> IronResult<Response> {
        // If this was the last before, yield to next phase.
        if index >= self.befores.len() {
            return self.fail_from_handler(req, err)
        }

        for (i, before) in self.befores[index..].iter().enumerate() {
            err = match before.catch(req, err) {
                Err(err) => err,
                Ok(()) => return self.continue_from_before(req, index + i + 1)
            };
        }

        // Next phase
        self.fail_from_handler(req, err)
    }
// Enter the error flow from a before middleware, starting
// at the passed index.
//
// If the index is out of bounds for the before middleware Vec,
// this instead behaves the same as fail_from_handler.
Enter the error flow from a before middleware, starting
at the passed index.

If the index is out of bounds for the before middleware Vec,
this instead behaves the same as fail_from_handler.
Enter the error flow from a before middleware starting at the passed index . If the index is out of bounds for the before middleware Vec this instead behaves the same as fail_from_handler .
fn fail_from_before(&self, req: &mut Request, index: usize,
                        mut err: IronError) -> IronResult<Response> {
        // If this was the last before, yield to next phase.
        if index >= self.befores.len() {
            return self.fail_from_handler(req, err)
        }
        for (i, before) in self.befores[index..].iter().enumerate() {
            err = match before.catch(req, err) {
                Err(err) => err,
                Ok(()) => return self.continue_from_before(req, index + i + 1)
            };
        }
        // Next phase
        self.fail_from_handler(req, err)
    }
fn fail_from_before ( & self , req : & mut Request , index : usize , mut err : IronError ) -> IronResult < Response > { // If this was the last before, yield to next phase. if index >= self . befores . len ( ) { return self . fail_from_handler ( req , err ) } for ( i , before ) in self . befores [ index .. ] . iter ( ) . enumerate ( ) { err = match before . catch ( req , err ) { Err ( err ) => err , Ok ( ( ) ) => return self . continue_from_before ( req , index + i + 1 ) } ; } // Next phase self . fail_from_handler ( req , err ) }
Enter the error flow from a before middleware, starting
at the passed index.
Enter the error flow from a before middleware starting at the passed index .
&self
req
&mut Request
index
usize
err
IronError