#[non_exhaustive]
pub enum Error {
Closed {
initiator: Location,
source: &'static Location<'static>,
},
Transport {
code: Code,
frame_type: u64,
reason: &'static str,
initiator: Location,
source: &'static Location<'static>,
},
Application {
error: Error,
initiator: Location,
source: &'static Location<'static>,
},
StatelessReset {
source: &'static Location<'static>,
},
IdleTimerExpired {
source: &'static Location<'static>,
},
NoValidPath {
source: &'static Location<'static>,
},
StreamIdExhausted {
source: &'static Location<'static>,
},
MaxHandshakeDurationExceeded {
max_handshake_duration: Duration,
source: &'static Location<'static>,
},
ImmediateClose {
reason: &'static str,
source: &'static Location<'static>,
},
EndpointClosing {
source: &'static Location<'static>,
},
Unspecified {
source: &'static Location<'static>,
},
}
Expand description
Errors that a connection can encounter.
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
The connection was closed without an error
Fields
This variant is marked as non-exhaustive
Non-exhaustive enum variants could have additional fields added in future. Therefore, non-exhaustive enum variants cannot be constructed in external crates and cannot be matched against.
The connection was closed on the transport level
This can occur either locally or by the peer. The argument contains
the error code which the transport provided in order to close the
connection.
Fields
This variant is marked as non-exhaustive
Non-exhaustive enum variants could have additional fields added in future. Therefore, non-exhaustive enum variants cannot be constructed in external crates and cannot be matched against.
The connection was closed on the application level
This can occur either locally or by the peer. The argument contains
the error code which the application/ supplied in order to close the
connection.
Fields
This variant is marked as non-exhaustive
Non-exhaustive enum variants could have additional fields added in future. Therefore, non-exhaustive enum variants cannot be constructed in external crates and cannot be matched against.
The connection was reset by a stateless reset from the peer
Fields
This variant is marked as non-exhaustive
Non-exhaustive enum variants could have additional fields added in future. Therefore, non-exhaustive enum variants cannot be constructed in external crates and cannot be matched against.
The connection was closed because the local connection’s idle timer expired
Fields
This variant is marked as non-exhaustive
Non-exhaustive enum variants could have additional fields added in future. Therefore, non-exhaustive enum variants cannot be constructed in external crates and cannot be matched against.
The connection was closed because there are no valid paths
Fields
This variant is marked as non-exhaustive
Non-exhaustive enum variants could have additional fields added in future. Therefore, non-exhaustive enum variants cannot be constructed in external crates and cannot be matched against.
All Stream IDs for Streams on the given connection had been exhausted
Fields
This variant is marked as non-exhaustive
Non-exhaustive enum variants could have additional fields added in future. Therefore, non-exhaustive enum variants cannot be constructed in external crates and cannot be matched against.
The handshake has taken longer to complete than the configured max handshake duration
Fields
This variant is marked as non-exhaustive
Non-exhaustive enum variants could have additional fields added in future. Therefore, non-exhaustive enum variants cannot be constructed in external crates and cannot be matched against.
The connection should be closed immediately without notifying the peer
The connection attempt was rejected because the endpoint is closing
Fields
This variant is marked as non-exhaustive
Non-exhaustive enum variants could have additional fields added in future. Therefore, non-exhaustive enum variants cannot be constructed in external crates and cannot be matched against.
The connection was closed due to an unspecified reason
Fields
This variant is marked as non-exhaustive
Non-exhaustive enum variants could have additional fields added in future. Therefore, non-exhaustive enum variants cannot be constructed in external crates and cannot be matched against.
Performs copy-assignment from
source
.
Read more
Formats the value using the given formatter.
Read more
Formats the value using the given formatter.
Read more
The lower-level source of this error, if any.
Read more
👎Deprecated since 1.42.0: use the Display impl or to_string()
👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
🔬This is a nightly-only experimental API. (error_generic_member_access
)
Provides type based access to context intended for error reports.
Read more
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
This method tests for self
and other
values to be equal, and is used
by ==
.
This method tests for !=
. The default implementation is almost always
sufficient, and should not be overridden without very good reason.
Returns the associated
Error
, if any
Immutably borrows from an owned value.
Read more
Mutably borrows from an owned value.
Read more
Checks if this value is equivalent to the given key.
Read more
Returns the argument unchanged.
Calls U::from(self)
.
That is, this conversion is whatever the implementation of
From<T> for U
chooses to do.
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning.
Read more
Uses borrowed data to replace owned data, usually by cloning.
Read more
Converts the given value to a
String
.
Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.