#[non_exhaustive]
pub enum Error {
Show 16 variants NoRelays(String), NeedConsensus, PendingFailed, CircTimeout, GuardNotUsable, UsageNotSupported(String), RequestTimeout, RequestFailed(RetryError<Box<Error>>), CircCancelled, Internal(String), ChanFailed(Error), Protocol(Error), State(Error), GuardMgr(GuardMgrError), Guard(PickGuardError), ExpiredConsensus,
}
Expand description

An error returned while looking up or building a circuit

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.

NoRelays(String)

Tuple Fields

0: String

No suitable relays for a request

NeedConsensus

We need to have a consensus directory to build this kind of circuits, and we only got a list of fallbacks.

PendingFailed

We were waiting on a pending circuit, but it didn’t succeed.

CircTimeout

A circuit build took too long to finish.

GuardNotUsable

We started building a circuit on a guard, but later decided not to use that guard.

UsageNotSupported(String)

Tuple Fields

0: String

Tried to take a circuit for a purpose it doesn’t support.

RequestTimeout

A request spent too long waiting for a circuit

RequestFailed(RetryError<Box<Error>>)

Tuple Fields

Unable to get or build a circuit, despite retrying.

CircCancelled

A circuit succeeded, but was cancelled before it could be used.

Circuits can be cancelled either by a call to retire_all_circuits(), or by a configuration change that makes old paths unusable.

Internal(String)

Tuple Fields

0: String

An error caused by a programming issue or a failure in another library that we can’t work around.

ChanFailed(Error)

Tuple Fields

0: Error

Couldn’t get a channel for a circuit.

Protocol(Error)

Tuple Fields

0: Error

Protocol issue while building a circuit.

State(Error)

Tuple Fields

0: Error

Problem loading or storing persistent state.

GuardMgr(GuardMgrError)

Tuple Fields

Problem creating or updating a guard manager.

Guard(PickGuardError)

Tuple Fields

Problem selecting a guard relay.

ExpiredConsensus

We have an expired consensus

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Formats the value using the given formatter. Read more

The lower-level source of this error, if any. Read more

🔬 This is a nightly-only experimental API. (backtrace)

Returns a stack backtrace, if available, of where this error occurred. Read more

👎 Deprecated since 1.42.0:

use the Display impl or to_string()

👎 Deprecated since 1.33.0:

replaced by Error::source, which can support downcasting

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

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

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Performs the conversion.

Should always be Self

The resulting type after obtaining ownership.

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

🔬 This is a nightly-only experimental API. (toowned_clone_into)

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

Converts the given value to a String. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

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

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