pub enum ProtError {
IoError(Error),
WebError(WebError),
Extension(&'static str),
Timeout(TimeoutError),
SendError,
ServerUpgradeHttp2(Binary, Option<RecvRequest>),
ClientUpgradeHttp2(Settings),
ServerUpgradeWs(RecvRequest),
ClientUpgradeWs(RecvRequest),
GoAway(Binary, Reason, Initiator),
}
Variants§
IoError(Error)
标准错误库的错误类型
WebError(WebError)
解析库发生错误
Extension(&'static str)
其它错误信息
Timeout(TimeoutError)
SendError
ServerUpgradeHttp2(Binary, Option<RecvRequest>)
协议数据升级, 第一参数表示将要写给客户端的消息, 第二参数表示原来未处理的请求
ClientUpgradeHttp2(Settings)
协议数据升级, 第一参数表示将要写给客户端的消息, 第二参数表示原来未处理的请求
ServerUpgradeWs(RecvRequest)
协议数据升级, 保留原请求
ClientUpgradeWs(RecvRequest)
GoAway(Binary, Reason, Initiator)
发生错误或者收到关闭消息将要关闭该链接
Implementations§
Source§impl ProtError
impl ProtError
pub fn is_timeout(&self) -> (bool, bool)
pub fn is_io(&self) -> bool
pub fn is_read_timeout(&self) -> (bool, bool)
pub fn is_write_timeout(&self) -> (bool, bool)
pub fn is_server_upgrade_http2(&self) -> bool
pub fn is_server_upgrade_ws(&self) -> bool
pub fn connect_timeout(val: &'static str) -> Self
pub fn read_timeout(val: &'static str) -> Self
pub fn write_timeout(val: &'static str) -> Self
pub fn time_timeout(val: &'static str) -> Self
pub fn ka_timeout(val: &'static str) -> Self
Trait Implementations§
impl Send for ProtError
impl Sync for ProtError
Auto Trait Implementations§
impl Freeze for ProtError
impl !RefUnwindSafe for ProtError
impl Unpin for ProtError
impl !UnwindSafe for ProtError
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