#[non_exhaustive]pub enum ConnectionError {
#[non_exhaustive] Local {
error: LocalError,
},
#[non_exhaustive] Remote(ConnectionErrorIncoming),
#[non_exhaustive] Timeout,
}Expand description
This enum represents the closure of a connection because of an a closed quic connection This can be either from this endpoint because of a violation of the protocol or from the remote endpoint
When the code Code::H3_NO_ERROR is used bei this peer or the remote peer, the connection is
closed without an error according to the HTTP/3 specification
Variants (Non-exhaustive)§
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.
#[non_exhaustive]Local
The error occurred on the local side of 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.
§
error: LocalErrorThe error
#[non_exhaustive]Remote(ConnectionErrorIncoming)
Error returned by the quic layer A QUIC error occurred or the remote HTTP/3 endpoint closed the connection.
#[non_exhaustive]Timeout
Timeout occurred
Implementations§
Source§impl ConnectionError
impl ConnectionError
Sourcepub fn is_h3_no_error(&self) -> bool
pub fn is_h3_no_error(&self) -> bool
Returns if the error is H3_NO_ERROR local or remote
Trait Implementations§
Source§impl Clone for ConnectionError
impl Clone for ConnectionError
Source§impl Debug for ConnectionError
impl Debug for ConnectionError
Source§impl Display for ConnectionError
impl Display for ConnectionError
Source§impl Error for ConnectionError
impl Error for ConnectionError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns 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 !RefUnwindSafe for ConnectionError
impl !UnwindSafe for ConnectionError
impl Freeze for ConnectionError
impl Send for ConnectionError
impl Sync for ConnectionError
impl Unpin for ConnectionError
impl UnsafeUnpin for ConnectionError
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