Enum pavex::middleware::Processing
source · pub enum Processing<T = Response>where
T: IntoResponse,{
Continue,
EarlyReturn(T),
}
Expand description
The return type of a pre-processing middleware.
It signals to Pavex whether the request processing should continue or be aborted, and if so, with what response.
Check out Blueprint::pre_process
for more information.
Variants§
Implementations§
source§impl<T: IntoResponse> Processing<T>
impl<T: IntoResponse> Processing<T>
sourcepub fn into_response(self) -> Option<T>
pub fn into_response(self) -> Option<T>
Converts the Processing
instance into a response, if the intention is to abort.
It returns None
if the intention is to continue the request processing.
Auto Trait Implementations§
impl<T> Freeze for Processing<T>where
T: Freeze,
impl<T> RefUnwindSafe for Processing<T>where
T: RefUnwindSafe,
impl<T> Send for Processing<T>where
T: Send,
impl<T> Sync for Processing<T>where
T: Sync,
impl<T> Unpin for Processing<T>where
T: Unpin,
impl<T> UnwindSafe for Processing<T>where
T: UnwindSafe,
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