#[non_exhaustive]pub enum H2ErrorCode {
Show 14 variants
NoError = 0,
ProtocolError = 1,
InternalError = 2,
FlowControlError = 3,
SettingsTimeout = 4,
StreamClosed = 5,
FrameSizeError = 6,
RefusedStream = 7,
Cancel = 8,
CompressionError = 9,
ConnectError = 10,
EnhanceYourCalm = 11,
InadequateSecurity = 12,
Http1_1Required = 13,
}Expand description
H2 error codes per RFC 9113 §7.
The same codes appear in both GOAWAY (connection errors) and RST_STREAM (stream errors);
whether a given use is connection- or stream-level is determined by context, not by the code
itself. Unknown wire values decode to Self::NoError per §5.4.4 / §5.4.5.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
NoError = 0
Graceful shutdown or no error to signal.
ProtocolError = 1
Peer violated protocol requirements.
InternalError = 2
An internal error in the HTTP stack.
FlowControlError = 3
Peer violated flow-control limits.
SettingsTimeout = 4
Settings frame was not acknowledged in a timely manner.
StreamClosed = 5
A frame was received on a closed stream.
FrameSizeError = 6
A frame of an incorrect size was received.
RefusedStream = 7
The stream was refused before any application processing.
Cancel = 8
The stream was cancelled.
CompressionError = 9
HPACK compression state could not be maintained.
ConnectError = 10
TCP connection for a CONNECT request was reset or abnormally closed.
EnhanceYourCalm = 11
Peer is generating excessive load.
InadequateSecurity = 12
Negotiated TLS parameters are unacceptable.
Http1_1Required = 13
Request must be retried over HTTP/1.1.
Trait Implementations§
Source§impl Clone for H2ErrorCode
impl Clone for H2ErrorCode
Source§fn clone(&self) -> H2ErrorCode
fn clone(&self) -> H2ErrorCode
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for H2ErrorCode
impl Debug for H2ErrorCode
Source§impl Display for H2ErrorCode
impl Display for H2ErrorCode
Source§impl Error for H2ErrorCode
impl Error for H2ErrorCode
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
use the Display impl or to_string()
Source§impl From<H2ErrorCode> for H2Error
impl From<H2ErrorCode> for H2Error
Source§fn from(source: H2ErrorCode) -> Self
fn from(source: H2ErrorCode) -> Self
Source§impl From<H2ErrorCode> for u32
impl From<H2ErrorCode> for u32
Source§fn from(code: H2ErrorCode) -> u32
fn from(code: H2ErrorCode) -> u32
Source§impl From<u32> for H2ErrorCode
impl From<u32> for H2ErrorCode
Source§fn from(value: u32) -> Self
fn from(value: u32) -> Self
Unknown error codes decode to Self::NoError per RFC 9113 §5.4.4 / §5.4.5.
Source§impl PartialEq for H2ErrorCode
impl PartialEq for H2ErrorCode
Source§fn eq(&self, other: &H2ErrorCode) -> bool
fn eq(&self, other: &H2ErrorCode) -> bool
self and other values to be equal, and is used by ==.impl Copy for H2ErrorCode
impl Eq for H2ErrorCode
impl StructuralPartialEq for H2ErrorCode
Auto Trait Implementations§
impl Freeze for H2ErrorCode
impl RefUnwindSafe for H2ErrorCode
impl Send for H2ErrorCode
impl Sync for H2ErrorCode
impl Unpin for H2ErrorCode
impl UnsafeUnpin for H2ErrorCode
impl UnwindSafe for H2ErrorCode
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.