Enum tor_cell::relaycell::msg::RelayMsg[][src]

#[non_exhaustive]
pub enum RelayMsg {
Show 16 variants Begin(Begin), Data(Data), End(End), Connected(Connected), Sendme(Sendme), Extend(Extend), Extended(Extended), Extend2(Extend2), Extended2(Extended2), Truncate, Truncated(Truncated), Drop, Resolve(Resolve), Resolved(Resolved), BeginDir, 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

Tuple Fields of Begin

0: Begin
Data(Data)

Send data on a stream

Tuple Fields of Data

0: Data
End(End)

Close a stream

Tuple Fields of End

0: End
Connected(Connected)

Successful response to a Begin message

Tuple Fields of Connected

0: Connected
Sendme(Sendme)

For flow control

Tuple Fields of Sendme

0: Sendme
Extend(Extend)

Extend a circuit to a new hop (deprecated)

Tuple Fields of Extend

0: Extend
Extended(Extended)

Successful response to an Extend message (deprecated)

Tuple Fields of Extended

0: Extended
Extend2(Extend2)

Extend a circuit to a new hop

Tuple Fields of Extend2

0: Extend2
Extended2(Extended2)

Successful response to an Extend2 message

Tuple Fields of Extended2

0: Extended2
Truncate

Partially close a circuit

Truncated(Truncated)

Tell the client the a circuit has been partially closed

Tuple Fields of Truncated

0: Truncated
Drop

Used for padding

Resolve(Resolve)

Launch a DNS request

Tuple Fields of Resolve

0: Resolve
Resolved(Resolved)

Response to a Resolve message

Tuple Fields of Resolved

0: Resolved
BeginDir

Start a directory stream

Unrecognized(Unrecognized)

An unrecognized command.

Tuple Fields of Unrecognized

0: Unrecognized

Implementations

Return the stream command associated with this message.

Extract the body of this message from r

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

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Performs the conversion.

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.

Performs the conversion.

Should always be Self

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

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.