pub enum Http1Error {
Show 16 variants
SyntaxError(String),
HeaderTooLarge,
RequestLineTooLong,
TooManyHeaders,
BodyTooLarge,
MissingHost,
UnsupportedMethod(String),
UnsupportedVersion(String),
SmugglingDetected(String),
ChunkedError(String),
ProtocolInconsistency(String),
ConnectionClosed,
NeedMoreData,
IdleTimeout,
BufferOverflow,
Internal(String),
}Expand description
HTTP/1.1 错误类型
Variants§
SyntaxError(String)
语法错误
HeaderTooLarge
头部过大
RequestLineTooLong
请求行过长(M-3:完整行与未完成行统一语义)
TooManyHeaders
头部过多
BodyTooLarge
请求体过大
MissingHost
缺少 Host 头
UnsupportedMethod(String)
方法不支持
UnsupportedVersion(String)
版本不支持
SmugglingDetected(String)
请求走私检测
ChunkedError(String)
分块编码错误
ProtocolInconsistency(String)
协议不一致(Content-Length / Transfer-Encoding 共存等)
ConnectionClosed
连接已关闭
NeedMoreData
数据不足
IdleTimeout
空闲超时(Slowloris 防护)
BufferOverflow
缓冲区溢出(累积数据超过上限)
Internal(String)
内部错误
Trait Implementations§
Source§impl Clone for Http1Error
impl Clone for Http1Error
Source§fn clone(&self) -> Http1Error
fn clone(&self) -> Http1Error
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for Http1Error
impl Debug for Http1Error
Source§impl Display for Http1Error
impl Display for Http1Error
impl Eq for Http1Error
Source§impl Error for Http1Error
impl Error for Http1Error
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()
Source§impl PartialEq for Http1Error
impl PartialEq for Http1Error
impl StructuralPartialEq for Http1Error
Auto Trait Implementations§
impl Freeze for Http1Error
impl RefUnwindSafe for Http1Error
impl Send for Http1Error
impl Sync for Http1Error
impl Unpin for Http1Error
impl UnsafeUnpin for Http1Error
impl UnwindSafe for Http1Error
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