#[non_exhaustive]pub enum ErrorCode {
Normal,
ProtocolError,
InternalError,
FlowControlError,
StreamLimit,
InvalidVersion,
Timeout,
Unknown(u32),
}Expand description
Wire-level error code, transmitted in GoAway frames as a u32.
Unknown codes coming from the peer are preserved as ErrorCode::Unknown
so applications can still observe them.
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.
Normal
Graceful shutdown initiated locally or remotely.
ProtocolError
Wire-format / framing violation.
InternalError
Internal bug in either side.
FlowControlError
Peer violated flow control (e.g. sent more bytes than advertised).
StreamLimit
Maximum concurrent streams would be exceeded.
InvalidVersion
Protocol version mismatch.
Timeout
Idle / keepalive timeout fired.
Unknown(u32)
Code not recognised by this version of the library.
Implementations§
Trait Implementations§
impl Copy for ErrorCode
impl Eq for ErrorCode
impl StructuralPartialEq for ErrorCode
Auto Trait Implementations§
impl Freeze for ErrorCode
impl RefUnwindSafe for ErrorCode
impl Send for ErrorCode
impl Sync for ErrorCode
impl Unpin for ErrorCode
impl UnsafeUnpin for ErrorCode
impl UnwindSafe for ErrorCode
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