Struct s2n_quic_core::transport::error::Error
source · pub struct Error {
pub code: Code,
pub frame_type: VarInt,
pub reason: &'static str,
}
Expand description
Transport Errors are 62-bit unsigned integer values indicating a QUIC transport error has occurred, as defined in QUIC Transport RFC.
Fields§
§code: Code
A 62-bit unsigned integer value indicating the error that occurred
frame_type: VarInt
If this error was caused by a particular QUIC frame, frame_type
will contain
the Frame Type as defined in QUIC Transport RFC.
reason: &'static str
Additional information about the error that occurred
Implementations§
source§impl Error
impl Error
sourcepub const fn with_frame_type(self, frame_type: VarInt) -> Self
pub const fn with_frame_type(self, frame_type: VarInt) -> Self
Updates the Error
with the specified frame_type
sourcepub const fn with_reason(self, reason: &'static str) -> Self
pub const fn with_reason(self, reason: &'static str) -> Self
Updates the Error
with the specified reason
source§impl Error
impl Error
sourcepub const NO_ERROR: Self = _
pub const NO_ERROR: Self = _
An endpoint uses this with CONNECTION_CLOSE to signal that the connection is being closed abruptly in the absence of any error
sourcepub const INTERNAL_ERROR: Self = _
pub const INTERNAL_ERROR: Self = _
The endpoint encountered an internal error and cannot continue with the connection.
sourcepub const CONNECTION_REFUSED: Self = _
pub const CONNECTION_REFUSED: Self = _
The server refused to accept a new connection.
sourcepub const FLOW_CONTROL_ERROR: Self = _
pub const FLOW_CONTROL_ERROR: Self = _
An endpoint received more data than it permitted in its advertised data limits.
sourcepub const STREAM_LIMIT_ERROR: Self = _
pub const STREAM_LIMIT_ERROR: Self = _
An endpoint received a frame for a stream identifier that exceeded its advertised stream limit for the corresponding stream type.
sourcepub const STREAM_STATE_ERROR: Self = _
pub const STREAM_STATE_ERROR: Self = _
An endpoint received a frame for a stream that was not in a state that permitted that frame.
sourcepub const FINAL_SIZE_ERROR: Self = _
pub const FINAL_SIZE_ERROR: Self = _
An endpoint received a STREAM frame containing data that exceeded the previously established final size.
sourcepub const FRAME_ENCODING_ERROR: Self = _
pub const FRAME_ENCODING_ERROR: Self = _
An endpoint received a frame that was badly formatted.
sourcepub const TRANSPORT_PARAMETER_ERROR: Self = _
pub const TRANSPORT_PARAMETER_ERROR: Self = _
An endpoint received transport parameters that were badly formatted.
sourcepub const CONNECTION_ID_LIMIT_ERROR: Self = _
pub const CONNECTION_ID_LIMIT_ERROR: Self = _
The number of connection IDs provided by the peer exceeds the advertised active_connection_id_limit.
sourcepub const PROTOCOL_VIOLATION: Self = _
pub const PROTOCOL_VIOLATION: Self = _
An endpoint detected an error with protocol compliance that was not covered by more specific error codes.
sourcepub const INVALID_TOKEN: Self = _
pub const INVALID_TOKEN: Self = _
A server received a client Initial that contained an invalid Token field.
sourcepub const APPLICATION_ERROR: Self = _
pub const APPLICATION_ERROR: Self = _
The application or application protocol caused the connection to be closed.
sourcepub const CRYPTO_BUFFER_EXCEEDED: Self = _
pub const CRYPTO_BUFFER_EXCEEDED: Self = _
An endpoint has received more data in CRYPTO frames than it can buffer.
sourcepub const KEY_UPDATE_ERROR: Self = _
pub const KEY_UPDATE_ERROR: Self = _
An endpoint detected errors in performing key updates.
sourcepub const AEAD_LIMIT_REACHED: Self = _
pub const AEAD_LIMIT_REACHED: Self = _
An endpoint has reached the confidentiality or integrity limit for the AEAD algorithm used by the given connection.
pub fn description(&self) -> Option<&'static str>
source§impl Error
impl Error
sourcepub const fn crypto_error(code: u8) -> Self
pub const fn crypto_error(code: u8) -> Self
Creates a crypto-level TransportError
from a TLS alert code.
sourcepub fn try_into_tls_error(self) -> Option<Error>
pub fn try_into_tls_error(self) -> Option<Error>
If the Error
contains a tls::Error
, it is returned
Trait Implementations§
source§impl Error for Error
impl Error for Error
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
source§impl From<DecoderError> for Error
impl From<DecoderError> for Error
Implements conversion from decoder errors
source§fn from(decoder_error: DecoderError) -> Self
fn from(decoder_error: DecoderError) -> Self
source§impl<'a> From<Error> for ConnectionClose<'a>
impl<'a> From<Error> for ConnectionClose<'a>
source§impl From<Error> for Error
impl From<Error> for Error
Implements conversion from TLS errors
See Error::crypto_error
for more details
source§impl From<Error> for ProcessingError
impl From<Error> for ProcessingError
source§impl From<Error> for StreamError
impl From<Error> for StreamError
source§impl From<VarIntError> for Error
impl From<VarIntError> for Error
Implements conversion from crypto errors
See Error::crypto_error
for more details
source§fn from(_: VarIntError) -> Self
fn from(_: VarIntError) -> Self
source§impl Ord for Error
impl Ord for Error
source§impl PartialEq for Error
impl PartialEq for Error
source§impl PartialOrd for Error
impl PartialOrd for Error
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read more