pub enum Outcome {
Continue,
Respond(ReplyData),
}Expand description
What a middleware’s before hook decided.
Variants§
Continue
Carry on — run the next middleware (and, eventually, the handler).
Respond(ReplyData)
Short-circuit: build this reply and return it. The handler and any
remaining before hooks are skipped (after hooks still run on the
reply). Use Outcome::Respond(reply::empty()), a reply::build_reply()
for an explicit status/headers, etc. — anything a handler could return.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Outcome
impl !Sync for Outcome
impl !UnwindSafe for Outcome
impl Freeze for Outcome
impl Send for Outcome
impl Unpin for Outcome
impl UnsafeUnpin for Outcome
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more