pub struct Error {
inner: Box<ErrorImpl>,
}
Expand description
Represents errors that can occur handling HTTP streams.
Fields§
§inner: Box<ErrorImpl>
Implementations§
source§impl Error
impl Error
sourcepub fn is_parse_too_large(&self) -> bool
pub fn is_parse_too_large(&self) -> bool
Returns true if this was an HTTP parse error caused by a message that was too large.
sourcepub fn is_parse_status(&self) -> bool
pub fn is_parse_status(&self) -> bool
Returns true if this was an HTTP parse error caused by an invalid response status code or reason phrase.
sourcepub fn is_canceled(&self) -> bool
pub fn is_canceled(&self) -> bool
Returns true if this was about a Request
that was canceled.
sourcepub fn is_connect(&self) -> bool
pub fn is_connect(&self) -> bool
Returns true if this was an error from Connect
.
sourcepub fn is_incomplete_message(&self) -> bool
pub fn is_incomplete_message(&self) -> bool
Returns true if the connection closed before a message could complete.
sourcepub fn is_body_write_aborted(&self) -> bool
pub fn is_body_write_aborted(&self) -> bool
Returns true if the body write was aborted.
sourcepub fn is_timeout(&self) -> bool
pub fn is_timeout(&self) -> bool
Returns true if the error was caused by a timeout.
sourcepub fn into_cause(self) -> Option<Box<dyn StdError + Send + Sync>>
pub fn into_cause(self) -> Option<Box<dyn StdError + Send + Sync>>
Consumes the error, returning its cause.
sourcepub fn client_connect_info(&self) -> Option<&Connected>
pub fn client_connect_info(&self) -> Option<&Connected>
Returns the info of the client connection on which this error occurred.
pub(crate) fn new(kind: Kind) -> Error
pub(crate) fn with<C: Into<Box<dyn StdError + Send + Sync>>>( self, cause: C, ) -> Error
pub(crate) fn with_client_connect_info(self, connect_info: Connected) -> Error
pub(crate) fn kind(&self) -> &Kind
pub(crate) fn find_source<E: StdError + 'static>(&self) -> Option<&E>
pub(crate) fn h2_reason(&self) -> Reason
pub(crate) fn new_canceled() -> Error
pub(crate) fn new_incomplete() -> Error
pub(crate) fn new_too_large() -> Error
pub(crate) fn new_version_h2() -> Error
pub(crate) fn new_unexpected_message() -> Error
pub(crate) fn new_io(cause: Error) -> Error
pub(crate) fn new_listen<E: Into<Box<dyn StdError + Send + Sync>>>( cause: E, ) -> Error
pub(crate) fn new_accept<E: Into<Box<dyn StdError + Send + Sync>>>( cause: E, ) -> Error
pub(crate) fn new_connect<E: Into<Box<dyn StdError + Send + Sync>>>( cause: E, ) -> Error
pub(crate) fn new_closed() -> Error
pub(crate) fn new_body<E: Into<Box<dyn StdError + Send + Sync>>>( cause: E, ) -> Error
pub(crate) fn new_body_write<E: Into<Box<dyn StdError + Send + Sync>>>( cause: E, ) -> Error
pub(crate) fn new_body_write_aborted() -> Error
fn new_user(user: User) -> Error
pub(crate) fn new_user_header() -> Error
pub(crate) fn new_header_timeout() -> Error
pub(crate) fn new_user_unsupported_version() -> Error
pub(crate) fn new_user_unsupported_request_method() -> Error
pub(crate) fn new_user_unsupported_status_code() -> Error
pub(crate) fn new_user_absolute_uri_required() -> Error
pub(crate) fn new_user_no_upgrade() -> Error
pub(crate) fn new_user_manual_upgrade() -> Error
pub(crate) fn new_user_make_service<E: Into<Box<dyn StdError + Send + Sync>>>( cause: E, ) -> Error
pub(crate) fn new_user_service<E: Into<Box<dyn StdError + Send + Sync>>>( cause: E, ) -> Error
pub(crate) fn new_user_body<E: Into<Box<dyn StdError + Send + Sync>>>( cause: E, ) -> Error
pub(crate) fn new_without_shutdown_not_h1() -> Error
pub(crate) fn new_shutdown(cause: Error) -> Error
pub(crate) fn new_user_dispatch_gone() -> Error
pub(crate) fn new_h2(cause: Error) -> Error
sourcepub fn message(&self) -> impl Display + '_
pub fn message(&self) -> impl Display + '_
The error’s standalone message, without the message from the source.
fn description(&self) -> &str
Trait Implementations§
source§impl Error for Error
impl Error for Error
source§fn source(&self) -> Option<&(dyn StdError + 'static)>
fn source(&self) -> Option<&(dyn StdError + 'static)>
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 Error
impl !RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl !UnwindSafe for Error
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