pub struct FlowCtrl { /* private fields */ }
Expand description
FlowCtrl
is used to control the flow of execute handlers.
When a request is coming, Router
will detect it and get the matched one.
And then salvo will collect all handlers (including added as middlewares) in a list.
All handlers in this list will executed one by one. Each handler can use FlowCtrl
to control this
flow, let the flow call next handler or skip all rest handlers.
NOTE: When Response
’s status code is set, and the status code Response::is_stamped()
is returns false,
all rest handlers will skipped.
Implementations§
source§impl FlowCtrl
impl FlowCtrl
Trait Implementations§
Auto Trait Implementations§
impl Freeze for FlowCtrl
impl !RefUnwindSafe for FlowCtrl
impl Send for FlowCtrl
impl Sync for FlowCtrl
impl Unpin for FlowCtrl
impl !UnwindSafe for FlowCtrl
Blanket Implementations§
source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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