Skip to main content

ErrorKind

Enum ErrorKind 

Source
#[non_exhaustive]
pub enum ErrorKind {
Show 40 variants InvalidInput, InvalidConfig, Io, Dns, Tls, Protocol, HandshakeRejected, ProviderFailed, CallbackPanicked, RuntimeUnavailable, ResourceExhausted, QueueFull, QueueClosed, ItemTooLarge, PendingLimitReached, SubscriptionLimitReached, CallbackOverflow, ControlOverflow, ObservationLagged, NotConnected, NotRunning, Unsupported, SessionAlreadyExists, ConnectionClosing, Closed, EngineDropped, Cancelled, TimedOut, DeadlineExceeded, DeliveryUnknown, RetryExhausted, InvalidPolicy, BodyNotReplayable, DuplicateRequestId, RoutingDisabled, RoutingModeMismatch, ClientAlreadyExists, ClientNotFound, Internal, HttpStatus,
}
Expand description

Broad classification of failures exposed by the networking API.

This enum is non-exhaustive so callers must handle values added in future releases.

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.
§

InvalidInput

The caller supplied a value that cannot be used for the requested operation.

§

InvalidConfig

A configuration value violates a documented validation rule.

§

Io

An operating-system or transport I/O operation failed.

§

Dns

Resolving the remote host name failed.

§

Tls

TLS negotiation or certificate validation failed.

§

Protocol

The peer or an application callback violated the expected protocol.

§

HandshakeRejected

The peer rejected the WebSocket upgrade handshake.

§

ProviderFailed

A user-supplied provider returned an error.

§

CallbackPanicked

A user callback or callback future unwound with a panic.

§

RuntimeUnavailable

The runtime could not start or accept required work.

§

ResourceExhausted

A bounded resource or concurrency budget could not admit more work.

§

QueueFull

A bounded queue reached its configured item or byte limit.

§

QueueClosed

The receiving side of a work queue has been closed.

§

ItemTooLarge

A message or frame exceeds the configured size limit.

§

PendingLimitReached

The maximum number of in-flight requests has been reached.

§

SubscriptionLimitReached

The maximum number of subscriptions has been reached.

§

CallbackOverflow

Callback delivery exceeded its bounded backlog.

§

ControlOverflow

Control-plane work exceeded its bounded backlog.

§

ObservationLagged

A subscription receiver fell behind and skipped observations.

§

NotConnected

The requested operation requires an established connection.

§

NotRunning

The operation requires an actively running network monitor view.

§

Unsupported

The operation is not implemented on this platform.

§

SessionAlreadyExists

A session with the requested identity is already active.

§

ConnectionClosing

The connection is already performing its closing sequence.

§

Closed

The relevant sender or receiver endpoint has been closed.

§

EngineDropped

The owning networking engine was dropped before completion.

§

Cancelled

The operation was cancelled by its caller or cancellation group.

§

TimedOut

The operation exceeded its configured deadline.

§

DeadlineExceeded

The operation exceeded its total retry deadline.

§

DeliveryUnknown

The message may have been written partially or its final delivery state is unknown.

§

RetryExhausted

All configured connection or request retry attempts were consumed.

§

InvalidPolicy

A retry policy or deadline configuration cannot be used.

§

BodyNotReplayable

The request body cannot be materialized again for another attempt.

§

DuplicateRequestId

A request identifier is already registered in the session.

§

RoutingDisabled

Response routing is disabled for the session.

§

RoutingModeMismatch

The operation requires a different response-routing mode.

§

ClientAlreadyExists

A client with the requested name is already registered.

§

ClientNotFound

No client with the requested name is registered.

§

Internal

An invariant or internal subsystem operation failed.

§

HttpStatus

An HTTP status represents the failed operation.

Trait Implementations§

Source§

impl Clone for ErrorKind

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

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

Performs copy-assignment from source. Read more
Source§

impl Copy for ErrorKind

Source§

impl Debug for ErrorKind

Source§

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

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

impl Eq for ErrorKind

Source§

impl From<ErrorKind> for NetError

Source§

fn from(kind: ErrorKind) -> Self

Converts to this type from the input type.
Source§

impl PartialEq for ErrorKind

Source§

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

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

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

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for ErrorKind

Auto Trait Implementations§

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<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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> Same for T

Source§

type Output = T

Should always be Self
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, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

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

fn try_from(value: U) -> Result<T, !>

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<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more