Struct tor_proto::channel::Channel[][src]

pub struct Channel { /* fields omitted */ }
Expand description

An open client channel, ready to send and receive Tor cells.

A channel is a direct connection to a Tor relay, implemented using TLS.

Implementations

Return a process-unique identifier for this channel.

Return the Ed25519 identity for the peer of this channel.

Return the (legacy) RSA identity for the peer of this channel.

Return an error if this channel is somehow mismatched with the given target.

Return true if this channel is closed and therefore unusable.

Transmit a single cell on a channel.

Return a newly allocated PendingClientCirc object with a corresponding circuit reactor. A circuit ID is allocated, but no messages are sent, and no cryptography is done.

To use the results of this method, call Reactor::run() in a new task, then use the methods of crate::circuit::PendingClientCirc to build the circuit.

Shut down this channel immediately, along with all circuits that are using it.

Note that other references to this channel may exist. If they do, they will stop working after you call this function.

It’s not necessary to call this method if you’re just done with a channel: the channel should close on its own once nothing is using it any more.

Trait Implementations

Formats the value using the given formatter. Read more

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