Enum tor_cell::chancell::msg::AnyChanMsg

source ·
#[non_exhaustive]
pub enum AnyChanMsg {
Show 19 variants Padding(Padding), Vpadding(Vpadding), Create(Create), CreateFast(CreateFast), Create2(Create2), Created(Created), CreatedFast(CreatedFast), Created2(Created2), Relay(Relay), RelayEarly(RelayEarly), Destroy(Destroy), Netinfo(Netinfo), Versions(Versions), PaddingNegotiate(PaddingNegotiate), Certs(Certs), AuthChallenge(AuthChallenge), Authenticate(Authenticate), Authorize(Authorize), Unrecognized(Unrecognized),
}
Expand description

Decoded message from a channel.

A ChanMsg is an item received on a channel – a message from another Tor client or relay that we are connected to directly over a TLS connection.

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

Padding(Padding)

A Padding message

§

Vpadding(Vpadding)

Variable-length padding message

§

Create(Create)

(Deprecated) TAP-based cell to create a new circuit.

§

CreateFast(CreateFast)

(Mostly deprecated) HMAC-based cell to create a new circuit.

§

Create2(Create2)

Cell to create a new circuit

§

Created(Created)

(Deprecated) Answer to a Create cell

§

CreatedFast(CreatedFast)

(Mostly Deprecated) Answer to a CreateFast cell

§

Created2(Created2)

Answer to a Create2 cell

§

Relay(Relay)

A message sent along a circuit, likely to a more-distant relay.

§

RelayEarly(RelayEarly)

A message sent along a circuit (limited supply)

§

Destroy(Destroy)

Tear down a circuit

§

Netinfo(Netinfo)

Part of channel negotiation: describes our position on the network

§

Versions(Versions)

Part of channel negotiation: describes what link protocol versions we support

§

PaddingNegotiate(PaddingNegotiate)

Negotiates what kind of channel padding to send

§

Certs(Certs)

Part of channel negotiation: additional certificates not in the TLS handshake

§

AuthChallenge(AuthChallenge)

Part of channel negotiation: additional random material to be used as part of authentication

§

Authenticate(Authenticate)

Part of channel negotiation: used to authenticate relays when they initiate the channel.

§

Authorize(Authorize)

Not yet used

§

Unrecognized(Unrecognized)

Any cell whose command we don’t recognize

Trait Implementations§

source§

impl ChanMsg for AnyChanMsg

source§

fn cmd(&self) -> ChanCmd

Return the ChanCmd for this message.
source§

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

Write the body of this message (not including length or command).
source§

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

Decode this message from a given reader, according to a specified command value. The reader must be truncated to the exact length of the body.
source§

impl Clone for AnyChanMsg

source§

fn clone(&self) -> AnyChanMsg

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 AnyChanMsg

source§

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

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

impl From<AuthChallenge> for AnyChanMsg

source§

fn from(m: AuthChallenge) -> AnyChanMsg

Converts to this type from the input type.
source§

impl From<Authenticate> for AnyChanMsg

source§

fn from(m: Authenticate) -> AnyChanMsg

Converts to this type from the input type.
source§

impl From<Authorize> for AnyChanMsg

source§

fn from(m: Authorize) -> AnyChanMsg

Converts to this type from the input type.
source§

impl From<Certs> for AnyChanMsg

source§

fn from(m: Certs) -> AnyChanMsg

Converts to this type from the input type.
source§

impl From<Create> for AnyChanMsg

source§

fn from(m: Create) -> AnyChanMsg

Converts to this type from the input type.
source§

impl From<Create2> for AnyChanMsg

source§

fn from(m: Create2) -> AnyChanMsg

Converts to this type from the input type.
source§

impl From<CreateFast> for AnyChanMsg

source§

fn from(m: CreateFast) -> AnyChanMsg

Converts to this type from the input type.
source§

impl From<Created> for AnyChanMsg

source§

fn from(m: Created) -> AnyChanMsg

Converts to this type from the input type.
source§

impl From<Created2> for AnyChanMsg

source§

fn from(m: Created2) -> AnyChanMsg

Converts to this type from the input type.
source§

impl From<CreatedFast> for AnyChanMsg

source§

fn from(m: CreatedFast) -> AnyChanMsg

Converts to this type from the input type.
source§

impl From<Destroy> for AnyChanMsg

source§

fn from(m: Destroy) -> AnyChanMsg

Converts to this type from the input type.
source§

impl From<Netinfo> for AnyChanMsg

source§

fn from(m: Netinfo) -> AnyChanMsg

Converts to this type from the input type.
source§

impl From<Padding> for AnyChanMsg

source§

fn from(m: Padding) -> AnyChanMsg

Converts to this type from the input type.
source§

impl From<PaddingNegotiate> for AnyChanMsg

source§

fn from(m: PaddingNegotiate) -> AnyChanMsg

Converts to this type from the input type.
source§

impl From<Relay> for AnyChanMsg

source§

fn from(m: Relay) -> AnyChanMsg

Converts to this type from the input type.
source§

impl From<RelayEarly> for AnyChanMsg

source§

fn from(m: RelayEarly) -> AnyChanMsg

Converts to this type from the input type.
source§

impl From<Unrecognized> for AnyChanMsg

source§

fn from(u: Unrecognized) -> AnyChanMsg

Converts to this type from the input type.
source§

impl From<Versions> for AnyChanMsg

source§

fn from(m: Versions) -> AnyChanMsg

Converts to this type from the input type.
source§

impl From<Vpadding> for AnyChanMsg

source§

fn from(m: Vpadding) -> AnyChanMsg

Converts to this type from the input type.

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