#[non_exhaustive]pub enum Error {
#[non_exhaustive]
Closed {
initiator: Location,
source: &'static Location<'static>,
},
#[non_exhaustive]
Transport {
code: Code,
frame_type: u64,
reason: &'static str,
initiator: Location,
source: &'static Location<'static>,
},
#[non_exhaustive]
Application {
error: Error,
initiator: Location,
source: &'static Location<'static>,
},
#[non_exhaustive]
StatelessReset {
source: &'static Location<'static>,
},
#[non_exhaustive]
IdleTimerExpired {
source: &'static Location<'static>,
},
#[non_exhaustive]
NoValidPath {
source: &'static Location<'static>,
},
#[non_exhaustive]
StreamIdExhausted {
source: &'static Location<'static>,
},
#[non_exhaustive]
MaxHandshakeDurationExceeded {
max_handshake_duration: Duration,
source: &'static Location<'static>,
},
#[non_exhaustive]
ImmediateClose {
reason: &'static str,
source: &'static Location<'static>,
},
#[non_exhaustive]
EndpointClosing {
source: &'static Location<'static>,
},
#[non_exhaustive]
InvalidConfiguration {
reason: &'static str,
source: &'static Location<'static>,
},
#[non_exhaustive]
Unspecified {
source: &'static Location<'static>,
},
}
Expand description
Errors that a connection can encounter.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Closed
The connection was closed without an error
Fields
This variant is marked as non-exhaustive
Transport
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
Application
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
StatelessReset
The connection was reset by a stateless reset from the peer
Fields
This variant is marked as non-exhaustive
IdleTimerExpired
The connection was closed because the local connection’s idle timer expired
Fields
This variant is marked as non-exhaustive
NoValidPath
The connection was closed because there are no valid paths
Fields
This variant is marked as non-exhaustive
StreamIdExhausted
All Stream IDs for Streams on the given connection had been exhausted
Fields
This variant is marked as non-exhaustive
MaxHandshakeDurationExceeded
The handshake has taken longer to complete than the configured max handshake duration
Fields
This variant is marked as non-exhaustive
ImmediateClose
The connection should be closed immediately without notifying the peer
Fields
This variant is marked as non-exhaustive
EndpointClosing
The connection attempt was rejected because the endpoint is closing
Fields
This variant is marked as non-exhaustive
InvalidConfiguration
The connection was closed due to invalid Application provided configuration
Fields
This variant is marked as non-exhaustive
Unspecified
The connection was closed due to an unspecified reason
Implementations§
Trait Implementations§
Source§impl Error for Error
impl Error for Error
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
Source§impl From<ConnectionClose<'_>> for Error
impl From<ConnectionClose<'_>> for Error
Source§fn from(error: ConnectionClose<'_>) -> Error
fn from(error: ConnectionClose<'_>) -> Error
Source§impl From<Error> for StreamError
impl From<Error> for StreamError
Source§fn from(error: Error) -> StreamError
fn from(error: Error) -> StreamError
impl Copy for Error
impl Eq for Error
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.