pub enum InterceptResult<T: IntoResponse> {
Return(Response),
Drop,
Continue(Request<Incoming>),
Error(T),
}Expand description
请求拦截结果
用于控制请求的处理流程
§变体
Return(Response): 直接返回响应,不继续处理Drop: 丢弃请求,不返回响应Continue(Request): 继续处理请求Error(T): 返回错误响应
Variants§
Auto Trait Implementations§
impl<T> !Freeze for InterceptResult<T>
impl<T> !RefUnwindSafe for InterceptResult<T>
impl<T> Send for InterceptResult<T>where
T: Send,
impl<T> !Sync for InterceptResult<T>
impl<T> Unpin for InterceptResult<T>where
T: Unpin,
impl<T> !UnwindSafe for InterceptResult<T>
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