Enum s2n_quic::connection::Error
source · [−]#[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.
Variants (Non-exhaustive)
This enum is marked as non-exhaustive
Closed
Fields
This variant is marked as non-exhaustive
initiator: Location
source: &'static Location<'static>
The connection was closed without an error
Transport
Fields
This variant is marked as non-exhaustive
code: Code
frame_type: u64
reason: &'static str
initiator: Location
source: &'static Location<'static>
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.
Application
Fields
This variant is marked as non-exhaustive
error: Error
initiator: Location
source: &'static Location<'static>
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.
StatelessReset
Fields
This variant is marked as non-exhaustive
source: &'static Location<'static>
The connection was reset by a stateless reset from the peer
IdleTimerExpired
Fields
This variant is marked as non-exhaustive
source: &'static Location<'static>
The connection was closed because the local connection’s idle timer expired
NoValidPath
Fields
This variant is marked as non-exhaustive
source: &'static Location<'static>
The connection was closed because there are no valid paths
StreamIdExhausted
Fields
This variant is marked as non-exhaustive
source: &'static Location<'static>
All Stream IDs for Streams on the given connection had been exhausted
MaxHandshakeDurationExceeded
Fields
This variant is marked as non-exhaustive
max_handshake_duration: Duration
source: &'static Location<'static>
The handshake has taken longer to complete than the configured max handshake duration
ImmediateClose
Fields
This variant is marked as non-exhaustive
reason: &'static str
source: &'static Location<'static>
The connection should be closed immediately without notifying the peer
EndpointClosing
Fields
This variant is marked as non-exhaustive
source: &'static Location<'static>
The connection attempt was rejected because the endpoint is closing
Unspecified
Fields
This variant is marked as non-exhaustive
source: &'static Location<'static>
The connection was closed due to an unspecified reason
Implementations
Trait Implementations
sourceimpl Error for Error
impl Error for Error
1.30.0 · sourcefn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
The lower-level source of this error, if any. Read more
sourcefn backtrace(&self) -> Option<&Backtrace>
fn backtrace(&self) -> Option<&Backtrace>
backtrace
)Returns a stack backtrace, if available, of where this error occurred. Read more
1.0.0 · sourcefn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
sourceimpl<'a> From<ConnectionClose<'a>> for Error
impl<'a> From<ConnectionClose<'a>> for Error
sourcefn from(error: ConnectionClose<'_>) -> Error
fn from(error: ConnectionClose<'_>) -> Error
Converts to this type from the input type.
sourceimpl From<CryptoError> for Error
impl From<CryptoError> for Error
sourcefn from(error: CryptoError) -> Error
fn from(error: CryptoError) -> Error
Converts to this type from the input type.
sourceimpl From<Error> for StreamError
impl From<Error> for StreamError
sourcefn from(error: Error) -> StreamError
fn from(error: Error) -> StreamError
Converts to this type from the input type.
sourceimpl TryInto for Error
impl TryInto for Error
sourcefn application_error(&self) -> Option<Error>
fn application_error(&self) -> Option<Error>
Returns the associated Error
, if any
impl Copy for Error
impl Eq for Error
impl StructuralEq for Error
impl StructuralPartialEq for Error
Auto Trait Implementations
impl RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl UnwindSafe for Error
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more