#[non_exhaustive]
pub enum AnyRelayMsg {
Show 19 variants Begin(Begin), Data(Data), End(End), Connected(Connected), Sendme(Sendme), Extend(Extend), Extended(Extended), Extend2(Extend2), Extended2(Extended2), Truncate(Truncate), Truncated(Truncated), Drop(Drop), Resolve(Resolve), Resolved(Resolved), BeginDir(BeginDir), ConnectUdp(ConnectUdp), ConnectedUdp(ConnectedUdp), Datagram(Datagram), Unrecognized(Unrecognized),
}
Expand description

A single parsed relay message, sent or received along 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.
§

Begin(Begin)

Create a stream

§

Data(Data)

Send data on a stream

§

End(End)

Close a stream

§

Connected(Connected)

Successful response to a Begin message

§

Sendme(Sendme)

For flow control

§

Extend(Extend)

Extend a circuit to a new hop (deprecated)

§

Extended(Extended)

Successful response to an Extend message (deprecated)

§

Extend2(Extend2)

Extend a circuit to a new hop

§

Extended2(Extended2)

Successful response to an Extend2 message

§

Truncate(Truncate)

Partially close a circuit

§

Truncated(Truncated)

Tell the client that a circuit has been partially closed

§

Drop(Drop)

Used for padding

§

Resolve(Resolve)

Launch a DNS request

§

Resolved(Resolved)

Response to a Resolve message

§

BeginDir(BeginDir)

Start a directory stream

§

ConnectUdp(ConnectUdp)

Available on crate feature experimental-udp only.

Start a UDP stream.

§

ConnectedUdp(ConnectedUdp)

Available on crate feature experimental-udp only.

Successful response to a ConnectUdp message

§

Datagram(Datagram)

Available on crate feature experimental-udp only.

UDP stream data

§

Unrecognized(Unrecognized)

An unrecognized command.

Trait Implementations§

source§

impl Clone for AnyRelayMsg

source§

fn clone(&self) -> AnyRelayMsg

Returns a copy 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 AnyRelayMsg

source§

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

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

impl From<Begin> for AnyRelayMsg

source§

fn from(m: Begin) -> AnyRelayMsg

Converts to this type from the input type.
source§

impl From<BeginDir> for AnyRelayMsg

source§

fn from(m: BeginDir) -> AnyRelayMsg

Converts to this type from the input type.
source§

impl From<ConnectUdp> for AnyRelayMsg

Available on crate feature experimental-udp only.
source§

fn from(m: ConnectUdp) -> AnyRelayMsg

Converts to this type from the input type.
source§

impl From<Connected> for AnyRelayMsg

source§

fn from(m: Connected) -> AnyRelayMsg

Converts to this type from the input type.
source§

impl From<ConnectedUdp> for AnyRelayMsg

Available on crate feature experimental-udp only.
source§

fn from(m: ConnectedUdp) -> AnyRelayMsg

Converts to this type from the input type.
source§

impl From<Data> for AnyRelayMsg

source§

fn from(m: Data) -> AnyRelayMsg

Converts to this type from the input type.
source§

impl From<Datagram> for AnyRelayMsg

Available on crate feature experimental-udp only.
source§

fn from(m: Datagram) -> AnyRelayMsg

Converts to this type from the input type.
source§

impl From<Drop> for AnyRelayMsg

source§

fn from(m: Drop) -> AnyRelayMsg

Converts to this type from the input type.
source§

impl From<End> for AnyRelayMsg

source§

fn from(m: End) -> AnyRelayMsg

Converts to this type from the input type.
source§

impl From<Extend> for AnyRelayMsg

source§

fn from(m: Extend) -> AnyRelayMsg

Converts to this type from the input type.
source§

impl From<Extend2> for AnyRelayMsg

source§

fn from(m: Extend2) -> AnyRelayMsg

Converts to this type from the input type.
source§

impl From<Extended> for AnyRelayMsg

source§

fn from(m: Extended) -> AnyRelayMsg

Converts to this type from the input type.
source§

impl From<Extended2> for AnyRelayMsg

source§

fn from(m: Extended2) -> AnyRelayMsg

Converts to this type from the input type.
source§

impl From<Resolve> for AnyRelayMsg

source§

fn from(m: Resolve) -> AnyRelayMsg

Converts to this type from the input type.
source§

impl From<Resolved> for AnyRelayMsg

source§

fn from(m: Resolved) -> AnyRelayMsg

Converts to this type from the input type.
source§

impl From<Sendme> for AnyRelayMsg

source§

fn from(m: Sendme) -> AnyRelayMsg

Converts to this type from the input type.
source§

impl From<Truncate> for AnyRelayMsg

source§

fn from(m: Truncate) -> AnyRelayMsg

Converts to this type from the input type.
source§

impl From<Truncated> for AnyRelayMsg

source§

fn from(m: Truncated) -> AnyRelayMsg

Converts to this type from the input type.
source§

impl From<Unrecognized> for AnyRelayMsg

source§

fn from(u: Unrecognized) -> AnyRelayMsg

Converts to this type from the input type.
source§

impl RelayMsg for AnyRelayMsg

source§

fn cmd(&self) -> RelayCmd

Return the stream command associated with this message.
source§

fn encode_onto<W>(self, w: &mut W) -> EncodeResult<()>where W: Writer + ?Sized,

Encode the body of this message, not including command or length
source§

fn decode_from_reader(cmd: RelayCmd, r: &mut Reader<'_>) -> Result<Self>

Extract the body of a message with command cmd from reader r.

Auto Trait Implementations§

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

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

const: unstable · source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

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

const: unstable · source§

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

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

const: unstable · 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 Twhere U: From<T>,

const: unstable · 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<T> for T

§

type Output = T

Should always be Self
source§

impl<T> ToOwned for Twhere T: Clone,

§

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 Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
const: unstable · source§

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

Performs the conversion.
source§

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

§

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

The type returned in the event of a conversion error.
const: unstable · source§

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

Performs the conversion.
§

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

§

fn vzip(self) -> V

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