pub enum MiddlewareResponse {
Next(IO),
Cancel(IO),
}Expand description
Represents the possible outcomes of a middleware execution.
A middleware can either allow the request to continue processing (Next)
or stop further processing and return a response immediately (Cancel).
Variants§
Next(IO)
Continues to the next middleware or the endpoint if no more middlewares are left.
The IO instance passed will be forwarded to the next middleware or the endpoint.
Cancel(IO)
Cancels the request processing and immediately returns a response to the client.
The IO instance provided will be used as the final response.
Auto Trait Implementations§
impl Freeze for MiddlewareResponse
impl !RefUnwindSafe for MiddlewareResponse
impl Send for MiddlewareResponse
impl Sync for MiddlewareResponse
impl Unpin for MiddlewareResponse
impl !UnwindSafe for MiddlewareResponse
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