Enum tor_cell::relaycell::msg::AnyRelayMsg

source ·
#[non_exhaustive]
pub enum AnyRelayMsg {
Show 28 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), EstablishIntro(EstablishIntro), EstablishRendezvous(EstablishRendezvous), Introduce1(Introduce1), Introduce2(Introduce2), Rendezvous1(Rendezvous1), Rendezvous2(Rendezvous2), IntroEstablished(IntroEstablished), RendezvousEstablished(RendezvousEstablished), IntroduceAck(IntroduceAck), 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

§

EstablishIntro(EstablishIntro)

Available on crate feature hs only.

Establish Introduction

§

EstablishRendezvous(EstablishRendezvous)

Available on crate feature hs only.

Establish Rendezvous

§

Introduce1(Introduce1)

Available on crate feature hs only.

Introduce1 (client to introduction point)

§

Introduce2(Introduce2)

Available on crate feature hs only.

Introduce2 (introduction point to service)

§

Rendezvous1(Rendezvous1)

Available on crate feature hs only.

Rendezvous1 (service to rendezvous point)

§

Rendezvous2(Rendezvous2)

Available on crate feature hs only.

Rendezvous2 (rendezvous point to client)

§

IntroEstablished(IntroEstablished)

Available on crate feature hs only.

Acknowledgement for EstablishIntro.

§

RendezvousEstablished(RendezvousEstablished)

Available on crate feature hs only.

Acknowledgment for EstablishRendezvous.

§

IntroduceAck(IntroduceAck)

Available on crate feature hs only.

Acknowledgement for Introduce1.

§

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<EstablishIntro> for AnyRelayMsg

Available on crate feature hs only.
source§

fn from(m: EstablishIntro) -> AnyRelayMsg

Converts to this type from the input type.
source§

impl From<EstablishRendezvous> for AnyRelayMsg

Available on crate feature hs only.
source§

fn from(m: EstablishRendezvous) -> 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<IntroEstablished> for AnyRelayMsg

Available on crate feature hs only.
source§

fn from(m: IntroEstablished) -> AnyRelayMsg

Converts to this type from the input type.
source§

impl From<Introduce1> for AnyRelayMsg

Available on crate feature hs only.
source§

fn from(m: Introduce1) -> AnyRelayMsg

Converts to this type from the input type.
source§

impl From<Introduce2> for AnyRelayMsg

Available on crate feature hs only.
source§

fn from(m: Introduce2) -> AnyRelayMsg

Converts to this type from the input type.
source§

impl From<IntroduceAck> for AnyRelayMsg

Available on crate feature hs only.
source§

fn from(m: IntroduceAck) -> AnyRelayMsg

Converts to this type from the input type.
source§

impl From<Rendezvous1> for AnyRelayMsg

Available on crate feature hs only.
source§

fn from(m: Rendezvous1) -> AnyRelayMsg

Converts to this type from the input type.
source§

impl From<Rendezvous2> for AnyRelayMsg

Available on crate feature hs only.
source§

fn from(m: Rendezvous2) -> AnyRelayMsg

Converts to this type from the input type.
source§

impl From<RendezvousEstablished> for AnyRelayMsg

Available on crate feature hs only.
source§

fn from(m: RendezvousEstablished) -> 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.
source§

impl TryFrom<AnyRelayMsg> for Begin

§

type Error = Error

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

fn try_from(msg: AnyRelayMsg) -> Result<Begin>

Performs the conversion.
source§

impl TryFrom<AnyRelayMsg> for BeginDir

§

type Error = Error

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

fn try_from(msg: AnyRelayMsg) -> Result<BeginDir>

Performs the conversion.
source§

impl TryFrom<AnyRelayMsg> for ConnectUdp

§

type Error = Error

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

fn try_from(msg: AnyRelayMsg) -> Result<ConnectUdp>

Performs the conversion.
source§

impl TryFrom<AnyRelayMsg> for Connected

§

type Error = Error

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

fn try_from(msg: AnyRelayMsg) -> Result<Connected>

Performs the conversion.
source§

impl TryFrom<AnyRelayMsg> for ConnectedUdp

§

type Error = Error

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

fn try_from(msg: AnyRelayMsg) -> Result<ConnectedUdp>

Performs the conversion.
source§

impl TryFrom<AnyRelayMsg> for Data

§

type Error = Error

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

fn try_from(msg: AnyRelayMsg) -> Result<Data>

Performs the conversion.
source§

impl TryFrom<AnyRelayMsg> for Datagram

§

type Error = Error

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

fn try_from(msg: AnyRelayMsg) -> Result<Datagram>

Performs the conversion.
source§

impl TryFrom<AnyRelayMsg> for Drop

§

type Error = Error

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

fn try_from(msg: AnyRelayMsg) -> Result<Drop>

Performs the conversion.
source§

impl TryFrom<AnyRelayMsg> for End

§

type Error = Error

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

fn try_from(msg: AnyRelayMsg) -> Result<End>

Performs the conversion.
source§

impl TryFrom<AnyRelayMsg> for EstablishIntro

§

type Error = Error

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

fn try_from(msg: AnyRelayMsg) -> Result<EstablishIntro>

Performs the conversion.
source§

impl TryFrom<AnyRelayMsg> for EstablishRendezvous

§

type Error = Error

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

fn try_from(msg: AnyRelayMsg) -> Result<EstablishRendezvous>

Performs the conversion.
source§

impl TryFrom<AnyRelayMsg> for Extend

§

type Error = Error

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

fn try_from(msg: AnyRelayMsg) -> Result<Extend>

Performs the conversion.
source§

impl TryFrom<AnyRelayMsg> for Extend2

§

type Error = Error

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

fn try_from(msg: AnyRelayMsg) -> Result<Extend2>

Performs the conversion.
source§

impl TryFrom<AnyRelayMsg> for Extended

§

type Error = Error

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

fn try_from(msg: AnyRelayMsg) -> Result<Extended>

Performs the conversion.
source§

impl TryFrom<AnyRelayMsg> for Extended2

§

type Error = Error

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

fn try_from(msg: AnyRelayMsg) -> Result<Extended2>

Performs the conversion.
source§

impl TryFrom<AnyRelayMsg> for IntroEstablished

§

type Error = Error

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

fn try_from(msg: AnyRelayMsg) -> Result<IntroEstablished>

Performs the conversion.
source§

impl TryFrom<AnyRelayMsg> for Introduce1

§

type Error = Error

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

fn try_from(msg: AnyRelayMsg) -> Result<Introduce1>

Performs the conversion.
source§

impl TryFrom<AnyRelayMsg> for Introduce2

§

type Error = Error

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

fn try_from(msg: AnyRelayMsg) -> Result<Introduce2>

Performs the conversion.
source§

impl TryFrom<AnyRelayMsg> for IntroduceAck

§

type Error = Error

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

fn try_from(msg: AnyRelayMsg) -> Result<IntroduceAck>

Performs the conversion.
source§

impl TryFrom<AnyRelayMsg> for Rendezvous1

§

type Error = Error

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

fn try_from(msg: AnyRelayMsg) -> Result<Rendezvous1>

Performs the conversion.
source§

impl TryFrom<AnyRelayMsg> for Rendezvous2

§

type Error = Error

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

fn try_from(msg: AnyRelayMsg) -> Result<Rendezvous2>

Performs the conversion.
source§

impl TryFrom<AnyRelayMsg> for RendezvousEstablished

§

type Error = Error

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

fn try_from(msg: AnyRelayMsg) -> Result<RendezvousEstablished>

Performs the conversion.
source§

impl TryFrom<AnyRelayMsg> for Resolve

§

type Error = Error

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

fn try_from(msg: AnyRelayMsg) -> Result<Resolve>

Performs the conversion.
source§

impl TryFrom<AnyRelayMsg> for Resolved

§

type Error = Error

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

fn try_from(msg: AnyRelayMsg) -> Result<Resolved>

Performs the conversion.
source§

impl TryFrom<AnyRelayMsg> for Sendme

§

type Error = Error

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

fn try_from(msg: AnyRelayMsg) -> Result<Sendme>

Performs the conversion.
source§

impl TryFrom<AnyRelayMsg> for Truncate

§

type Error = Error

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

fn try_from(msg: AnyRelayMsg) -> Result<Truncate>

Performs the conversion.
source§

impl TryFrom<AnyRelayMsg> for Truncated

§

type Error = Error

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

fn try_from(msg: AnyRelayMsg) -> Result<Truncated>

Performs the conversion.

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

source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
source§

impl<T> Same for T

§

type Output = T

Should always be Self
source§

impl<T> ToOwned for T
where 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 T
where U: Into<T>,

§

type Error = Infallible

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

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

Performs the conversion.
source§

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

§

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<V, T> VZip<V> for T
where V: MultiLane<T>,

source§

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