Error

Enum Error 

Source
pub enum Error {
Show 32 variants NoError, InternalError, ConnectionRefused, FlowControlError, StreamLimitError, StreamStateError, FinalSizeError, FrameEncodingError, TransportParameterError, ConnectionIdLimitError, ProtocolViolation, InvalidToken, ApplicationError, CryptoBufferExceeded, KeyUpdateError, AeadLimitReached, NoViablePath, CryptoError(u8), MultipathProtocolViolation, Done, BufferTooShort, UnknownVersion, InvalidPacket, InvalidState(String), InvalidOperation(String), InvalidConfig(String), ExpiredToken, CryptoFail, TlsFail(String), StreamStopped(u64), StreamReset(u64), IoError(String),
}
Expand description

QUIC transport error.

Variants§

§

NoError

An endpoint uses this with CONNECTION_CLOSE to signal that the connection is being closed abruptly in the absence of any error.

§

InternalError

The endpoint encountered an internal error and cannot continue with the connection

§

ConnectionRefused

The server refused to accept a new connection.

§

FlowControlError

An endpoint received more data than it permitted in its advertised data limits

§

StreamLimitError

An endpoint received a frame for a stream identifier that exceeded its advertised stream limit for the corresponding stream type

§

StreamStateError

An endpoint received a frame for a stream that was not in a state that permitted that frame;

§

FinalSizeError

(1) An endpoint received a STREAM frame containing data that exceeded the previously established final size, (2) an endpoint received a STREAM frame or a RESET_STREAM frame containing a final size that was lower than the size of stream data that was already received, or (3) an endpoint received a STREAM frame or a RESET_STREAM frame containing a different final size to the one already established.

§

FrameEncodingError

An endpoint received a frame that was badly formatted – for instance, a frame of an unknown type or an ACK frame that has more acknowledgment ranges than the remainder of the packet could carry.

§

TransportParameterError

An endpoint received transport parameters that were badly formatted, included an invalid value, omitted a mandatory transport parameter, included a forbidden transport parameter, or were otherwise in error.

§

ConnectionIdLimitError

The number of connection IDs provided by the peer exceeds the advertised active_connection_id_limit.

§

ProtocolViolation

An endpoint detected an error with protocol compliance that was not covered by more specific error codes.

§

InvalidToken

A server received a client Initial that contained an invalid Token field.

§

ApplicationError

The application or application protocol caused the connection to be closed.

§

CryptoBufferExceeded

An endpoint has received more data in CRYPTO frames than it can buffer.

§

KeyUpdateError

An endpoint detected errors in performing key updates.

§

AeadLimitReached

An endpoint has reached the confidentiality or integrity limit for the AEAD algorithm used by the given connection.

§

NoViablePath

An endpoint has determined that the network path is incapable of supporting QUIC. An endpoint is unlikely to receive a CONNECTION_CLOSE frame carrying this code except when the path does not support a large enough MTU.

§

CryptoError(u8)

The cryptographic handshake failed. A range of 256 values is reserved for carrying error codes specific to the cryptographic handshake.

§

MultipathProtocolViolation

An endpoint detected a multipath error with protocol compliance that was not covered by more specific error codes.

§

Done

There is no more work to do.

§

BufferTooShort

The provided buffer is too short.

§

UnknownVersion

The provided packet cannot be parsed because its version is unknown.

§

InvalidPacket

The provided packet cannot be parsed.

§

InvalidState(String)

The operation cannot be completed because it was attempted in an invalid state.

§

InvalidOperation(String)

The operation on the connection is invalid.

§

InvalidConfig(String)

The configuration is invalid.

§

ExpiredToken

A server received a client Initial that contained an expired Token.

§

CryptoFail

A cryptographic operation failed.

§

TlsFail(String)

The TLS handshake failed.

§

StreamStopped(u64)

The specified stream was stopped by the peer.

The error code sent as part of the STOP_SENDING frame is provided as associated data.

§

StreamReset(u64)

The specified stream was reset by the peer.

The error code sent as part of the RESET_STREAM frame is provided as associated data.

§

IoError(String)

I/O error.

Trait Implementations§

Source§

impl Clone for Error

Source§

fn clone(&self) -> Error

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Error

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for Error

Source§

fn default() -> Error

Returns the “default value” for a type. Read more
Source§

impl Display for Error

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Error for Error

Source§

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

👎Deprecated since 1.42.0: use the Display impl or to_string()
1.0.0 · Source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
Source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type-based access to context intended for error reports. Read more
Source§

impl From<Error> for Error

Source§

fn from(err: Error) -> Self

Converts to this type from the input type.
Source§

impl From<Error> for Http3Error

Source§

fn from(err: Error) -> Self

Converts to this type from the input type.
Source§

impl IntoEnumIterator for Error

Source§

impl PartialEq for Error

Source§

fn eq(&self, other: &Error) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Eq for Error

Source§

impl StructuralPartialEq for Error

Auto Trait Implementations§

§

impl Freeze for Error

§

impl RefUnwindSafe for Error

§

impl Send for Error

§

impl Sync for Error

§

impl Unpin for Error

§

impl UnwindSafe for Error

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V