#[non_exhaustive]pub enum MiddlewareResult {
Continue(MiddlewareInput),
Terminate(String),
}Expand description
Outcome from a middleware component.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Continue(MiddlewareInput)
Pass the (possibly modified) input to the next middleware.
Terminate(String)
Terminate the chain immediately with a message.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for MiddlewareResult
impl RefUnwindSafe for MiddlewareResult
impl Send for MiddlewareResult
impl Sync for MiddlewareResult
impl Unpin for MiddlewareResult
impl UnsafeUnpin for MiddlewareResult
impl UnwindSafe for MiddlewareResult
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