pub enum DoqErrorCode {
NoError,
InternalError,
ProtocolError,
RequestCancelled,
ExcessiveLoad,
ErrorReserved,
Unknown(u32),
}
Available on crate features
dns-over-quic
and tokio-runtime
only.Expand description
DoQ Error Codes, draft-ietf-dprive-dnsoquic, Feb. 28, 2022
5.3. DoQ Error Codes
The following error codes are defined for use when abruptly terminating streams, aborting reading of streams, or immediately closing connections:
DOQ_NO_ERROR (0x0):
No error. This is used when the connection or stream needs to be closed, but there is no error to signal.
DOQ_INTERNAL_ERROR (0x1):
The DoQ implementation encountered an internal error and is incapable of pursuing the transaction or the connection.
DOQ_PROTOCOL_ERROR (0x2):
The DoQ implementation encountered an protocol error and is forcibly aborting the connection.
DOQ_REQUEST_CANCELLED (0x3):
A DoQ client uses this to signal that it wants to cancel an outstanding transaction.
DOQ_EXCESSIVE_LOAD (0x4):
A DoQ implementation uses this to signal when closing a connection due to excessive load.
DOQ_ERROR_RESERVED (0xd098ea5e):
Alternative error code used for tests.
Variants§
NoError
No error. This is used when the connection or stream needs to be closed, but there is no error to signal.
InternalError
The DoQ implementation encountered an internal error and is incapable of pursuing the transaction or the connection.
ProtocolError
The DoQ implementation encountered an protocol error and is forcibly aborting the connection.
RequestCancelled
A DoQ client uses this to signal that it wants to cancel an outstanding transaction.
ExcessiveLoad
A DoQ implementation uses this to signal when closing a connection due to excessive load.
ErrorReserved
Alternative error code used for tests.
Unknown(u32)
Unknown Error code
Trait Implementations§
Source§impl Clone for DoqErrorCode
impl Clone for DoqErrorCode
Source§fn clone(&self) -> DoqErrorCode
fn clone(&self) -> DoqErrorCode
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl From<DoqErrorCode> for VarInt
impl From<DoqErrorCode> for VarInt
Source§fn from(doq_error: DoqErrorCode) -> Self
fn from(doq_error: DoqErrorCode) -> Self
Converts to this type from the input type.
Source§impl From<VarInt> for DoqErrorCode
impl From<VarInt> for DoqErrorCode
impl Copy for DoqErrorCode
Auto Trait Implementations§
impl Freeze for DoqErrorCode
impl RefUnwindSafe for DoqErrorCode
impl Send for DoqErrorCode
impl Sync for DoqErrorCode
impl Unpin for DoqErrorCode
impl UnwindSafe for DoqErrorCode
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