Enum AnyRelayMsg

Source
#[non_exhaustive]
pub enum AnyRelayMsg {
Show 32 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), ConfluxLink(ConfluxLink), ConfluxLinked(ConfluxLinked), ConfluxLinkedAck(ConfluxLinkedAck), ConfluxSwitch(ConfluxSwitch), 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

Available on crate feature conflux only.

Link circuits together at the receiving endpoint

§

ConfluxLinked(ConfluxLinked)

Available on crate feature conflux only.

Confirm that the circuits were linked

§

ConfluxLinkedAck(ConfluxLinkedAck)

Available on crate feature conflux only.

Acknowledge the linkage of the circuits, for RTT measurement.

§

ConfluxSwitch(ConfluxSwitch)

Available on crate feature conflux only.

Switch to another leg in an already linked circuit construction.

§

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 duplicate 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<ConfluxLink> for AnyRelayMsg

Available on crate feature conflux only.
Source§

fn from(m: ConfluxLink) -> AnyRelayMsg

Converts to this type from the input type.
Source§

impl From<ConfluxLinked> for AnyRelayMsg

Available on crate feature conflux only.
Source§

fn from(m: ConfluxLinked) -> AnyRelayMsg

Converts to this type from the input type.
Source§

impl From<ConfluxLinkedAck> for AnyRelayMsg

Available on crate feature conflux only.
Source§

fn from(m: ConfluxLinkedAck) -> AnyRelayMsg

Converts to this type from the input type.
Source§

impl From<ConfluxSwitch> for AnyRelayMsg

Available on crate feature conflux only.
Source§

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

Source§

fn indirect_memory_cost(&self, et: EnabledToken) -> usize

Memory cost of data stored out-of-line Read more
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

Source§

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

Source§

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§

type Error = Error

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

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

Performs the conversion.
Source§

impl TryFrom<AnyRelayMsg> for ConfluxLinked

Source§

type Error = Error

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

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

Performs the conversion.
Source§

impl TryFrom<AnyRelayMsg> for ConfluxLinkedAck

Source§

type Error = Error

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

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

Performs the conversion.
Source§

impl TryFrom<AnyRelayMsg> for ConfluxSwitch

Source§

type Error = Error

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

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

Performs the conversion.
Source§

impl TryFrom<AnyRelayMsg> for ConnectUdp

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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
§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedImplicit<'a, E> for T
where T: 'a,

§

fn implicit( self, class: Class, constructed: bool, tag: u32, ) -> TaggedParser<'a, Implicit, Self, E>

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
§

impl<T> Downcast for T
where T: Any,

§

fn into_any(self: Box<T>) -> Box<dyn Any>

Converts Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.
§

fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>

Converts Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further downcast into Rc<ConcreteType> where ConcreteType implements Trait.
§

fn as_any(&self) -> &(dyn Any + 'static)

Converts &Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &Any’s vtable from &Trait’s.
§

fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)

Converts &mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &mut Any’s vtable from &mut Trait’s.
§

impl<T> DowncastSend for T
where T: Any + Send,

§

fn into_any_send(self: Box<T>) -> Box<dyn Any + Send>

Converts Box<Trait> (where Trait: DowncastSend) to Box<dyn Any + Send>, which can then be downcast into Box<ConcreteType> where ConcreteType implements Trait.
§

impl<T> DowncastSync for T
where T: Any + Send + Sync,

§

fn into_any_sync(self: Box<T>) -> Box<dyn Any + Send + Sync>

Converts Box<Trait> (where Trait: DowncastSync) to Box<dyn Any + Send + Sync>, which can then be downcast into Box<ConcreteType> where ConcreteType implements Trait.
§

fn into_any_arc(self: Arc<T>) -> Arc<dyn Any + Send + Sync>

Converts Arc<Trait> (where Trait: DowncastSync) to Arc<Any>, which can then be downcast into Arc<ConcreteType> where ConcreteType implements Trait.
Source§

impl<T> DynClone for T
where T: Clone,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> HasMemoryCost for T
where T: HasMemoryCostStructural,

§

fn memory_cost(&self, et: EnabledToken) -> usize

Returns the memory cost of self, in bytes Read more
§

impl<T> HasTypedMemoryCost<T> for T
where T: HasMemoryCost,

§

fn typed_memory_cost(&self, enabled: EnabledToken) -> TypedMemoryCost<T>

The cost, as a TypedMemoryCost<T> rather than a raw usize
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

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

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

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

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

Source§

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

Source§

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

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

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

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
§

fn with_current_subscriber(self) -> WithDispatch<Self>

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

impl<T> ErasedDestructor for T
where T: 'static,