pub enum FilterAction {
Continue,
Reject(Rejection),
Release,
BodyDone,
}Expand description
Result of a filter’s request or response processing.
use praxis_filter::{FilterAction, Rejection};
let action = FilterAction::Continue;
assert!(matches!(action, FilterAction::Continue));
let reject = FilterAction::Reject(Rejection::status(403));
assert!(matches!(reject, FilterAction::Reject(r) if r.status == 403));
let release = FilterAction::Release;
assert!(matches!(release, FilterAction::Release));
let body_done = FilterAction::BodyDone;
assert!(matches!(body_done, FilterAction::BodyDone));Variants§
Continue
Continue to the next filter in the pipeline.
Reject(Rejection)
Stop processing and respond with the given rejection.
Release
Signal that accumulated body data (StreamBuffer mode)
should be forwarded to upstream. After release, remaining
chunks flow through in stream mode.
In non-StreamBuffer contexts (including the TCP pipeline),
behaves as Continue.
BodyDone
Skip this filter for remaining body chunks.
The filter has completed its body inspection and does not need to see further chunks. The pipeline continues calling other body filters; only this filter is skipped.
In non-body contexts (request and response phases),
behaves as Continue.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for FilterAction
impl RefUnwindSafe for FilterAction
impl Send for FilterAction
impl Sync for FilterAction
impl Unpin for FilterAction
impl UnsafeUnpin for FilterAction
impl UnwindSafe for FilterAction
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