Enum tor_proto::Error[][src]

#[non_exhaustive]
pub enum Error {
Show 23 variants BytesErr(Error), IoErr(Arc<Error>), CellErr(Error), MissingKey, InvalidOutputLength, NoSuchHop, InternalError(String), BadCellAuth, BadHandshake, ChanProto(String), CircProto(String), CircDestroy(String), ChannelClosed, CircuitClosed, IdRangeFull, CircExtend(&'static str), BadStreamAddress, EndReceived(EndReason), NotConnected, StreamProto(String), ChanMismatch(String), BadConfig(String), ResolveError(String),
}
Expand description

An error type for the tor-proto crate.

This type should probably be split into several. There’s more than one kind of error that can occur while doing something with the Tor protocol.

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.
BytesErr(Error)

An error that occurred in the tor_bytes crate while decoding an object.

Tuple Fields of BytesErr

0: Error
IoErr(Arc<Error>)

An error that occurred from the io system.

Tuple Fields of IoErr

0: Arc<Error>
CellErr(Error)

An error occurred in the cell-handling layer.

Tuple Fields of CellErr

0: Error
MissingKey

Somebody asked for a key that we didn’t have.

InvalidOutputLength

We tried to produce too much output for some function.

NoSuchHop

We tried to encrypt a message to a hop that wasn’t there.

InternalError(String)

There was a programming error somewhere in the code.

Tuple Fields of InternalError

0: String
BadCellAuth

The authentication information on this cell was completely wrong, or the cell was corrupted.

BadHandshake

A circuit-extension handshake failed.

ChanProto(String)

Protocol violation at the channel level

Tuple Fields of ChanProto

0: String
CircProto(String)

Protocol violation at the circuit level

Tuple Fields of CircProto

0: String
CircDestroy(String)

Circuit destroyed or channel closed.

Tuple Fields of CircDestroy

0: String
ChannelClosed

Channel is closed.

CircuitClosed

Circuit is closed.

IdRangeFull

Can’t allocate any more circuit or stream IDs on a channel.

CircExtend(&'static str)

Couldn’t extend a circuit.

Tuple Fields of CircExtend

0: &'static str
BadStreamAddress

Tried to make or use a stream to an invalid destination address.

EndReceived(EndReason)

Received an End cell from the other end of a stream.

Tuple Fields of EndReceived

0: EndReason
NotConnected

Stream was already closed when we tried to use it.

StreamProto(String)

Stream protocol violation

Tuple Fields of StreamProto

0: String
ChanMismatch(String)

Channel does not match target

Tuple Fields of ChanMismatch

0: String
BadConfig(String)

Tried to configure an impossible value

Tuple Fields of BadConfig

0: String
ResolveError(String)

Remote DNS lookup failed.

Tuple Fields of ResolveError

0: String

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.

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)

recently added

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