pub enum ExtractorError {
Show 13 variants
PathRejection(String),
QueryRejection(String),
JsonRejection(String),
FormRejection(String),
ExtensionRejection(String),
HostRejection(String),
TypedHeaderRejection(String),
CookieRejection(String),
MultipartRejection(String),
WebSocketUpgradeRejection(String),
BytesRejection(String),
StreamRejection(String),
Custom(String),
}Expand description
Extractor 错误类型
统一封装所有提取器可能产生的错误,便于错误处理和响应。
Variants§
PathRejection(String)
路径参数提取错误
QueryRejection(String)
查询参数提取错误
JsonRejection(String)
JSON 提取错误
FormRejection(String)
表单数据提取错误
ExtensionRejection(String)
扩展数据提取错误
HostRejection(String)
Host 提取错误
TypedHeaderRejection(String)
TypedHeader 提取错误
CookieRejection(String)
Cookie 提取错误
MultipartRejection(String)
Multipart 提取错误
WebSocketUpgradeRejection(String)
WebSocketUpgrade 提取错误
BytesRejection(String)
Bytes 提取错误
StreamRejection(String)
Stream 提取错误
Custom(String)
自定义错误消息
Trait Implementations§
Source§impl Debug for ExtractorError
impl Debug for ExtractorError
Source§impl Display for ExtractorError
impl Display for ExtractorError
Source§impl Error for ExtractorError
impl Error for ExtractorError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Auto Trait Implementations§
impl Freeze for ExtractorError
impl RefUnwindSafe for ExtractorError
impl Send for ExtractorError
impl Sync for ExtractorError
impl Unpin for ExtractorError
impl UnsafeUnpin for ExtractorError
impl UnwindSafe for ExtractorError
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