Struct RelayCmd

Source
pub struct RelayCmd(/* private fields */);
Expand description

A command that identifies the type of a relay cell

Implementations§

Source§

impl RelayCmd

Source

pub const BEGIN: RelayCmd

Start a new stream

Source

pub const DATA: RelayCmd

Data on a stream

Source

pub const END: RelayCmd

Close a stream

Source

pub const CONNECTED: RelayCmd

Acknowledge a BEGIN; stream is open

Source

pub const SENDME: RelayCmd

Used for flow control

Source

pub const EXTEND: RelayCmd

Extend a circuit to a new hop; deprecated

Source

pub const EXTENDED: RelayCmd

Reply to EXTEND handshake; deprecated

Source

pub const TRUNCATE: RelayCmd

Partially close a circuit

Source

pub const TRUNCATED: RelayCmd

Circuit has been partially closed

Source

pub const DROP: RelayCmd

Padding cell

Source

pub const RESOLVE: RelayCmd

Start a DNS lookup

Source

pub const RESOLVED: RelayCmd

Reply to a DNS lookup

Source

pub const BEGIN_DIR: RelayCmd

Start a directory stream

Source

pub const EXTEND2: RelayCmd

Extend a circuit to a new hop

Source

pub const EXTENDED2: RelayCmd

Reply to an EXTEND2 cell.

Source

pub const CONNECT_UDP: RelayCmd

NOTE: UDP command are reserved but only used with experimental-udp feature UDP: Start of a stream

Source

pub const CONNECTED_UDP: RelayCmd

UDP: Acknowledge a CONNECT_UDP. Stream is open.

Source

pub const DATAGRAM: RelayCmd

UDP: Data on a UDP stream.

Source

pub const ESTABLISH_INTRO: RelayCmd

HS: establish an introduction point.

Source

pub const ESTABLISH_RENDEZVOUS: RelayCmd

HS: establish a rendezvous point.

Source

pub const INTRODUCE1: RelayCmd

HS: send introduction (client to introduction point)

Source

pub const INTRODUCE2: RelayCmd

HS: send introduction (introduction point to service)

Source

pub const RENDEZVOUS1: RelayCmd

HS: connect rendezvous point (service to rendezvous point)

Source

pub const RENDEZVOUS2: RelayCmd

HS: connect rendezvous point (rendezvous point to client)

Source

pub const INTRO_ESTABLISHED: RelayCmd

HS: Response to ESTABLISH_INTRO

Source

pub const RENDEZVOUS_ESTABLISHED: RelayCmd

HS: Response to ESTABLISH_RENDEZVOUS

Source

pub const INTRODUCE_ACK: RelayCmd

HS: Response to INTRODUCE1 from introduction point to client

Source

pub const PADDING_NEGOTIATE: RelayCmd

Padding: declare what kind of padding we want

Source

pub const PADDING_NEGOTIATED: RelayCmd

Padding: reply to a PADDING_NEGOTIATE

Source

pub fn is_recognized(self) -> bool

Return true if this value is one that we recognize.

Source

pub fn from_name(name: &str) -> Option<Self>

Try to convert this value from one of the recognized names.

Source§

impl RelayCmd

Source

pub fn accepts_streamid_val(self, id: Option<StreamId>) -> bool

Return true if this command is one that accepts the particular stream ID id

Trait Implementations§

Source§

impl Clone for RelayCmd

Source§

fn clone(&self) -> RelayCmd

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 RelayCmd

Source§

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

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

impl Display for RelayCmd

Source§

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

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

impl From<RelayCmd> for u8

Source§

fn from(val: RelayCmd) -> u8

Converts to this type from the input type.
Source§

impl From<u8> for RelayCmd

Source§

fn from(num: u8) -> RelayCmd

Converts to this type from the input type.
Source§

impl HasMemoryCostStructural for RelayCmd

Source§

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

Memory cost of data stored out-of-line Read more
Source§

impl PartialEq for RelayCmd

Source§

fn eq(&self, other: &RelayCmd) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Copy for RelayCmd

Source§

impl Eq for RelayCmd

Source§

impl StructuralPartialEq for RelayCmd

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, dst: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. 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§

fn __clone_box(&self, _: Private) -> *mut ()

§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> HasMemoryCost for T

Source§

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

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

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

Source§

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> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. 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,

§

impl<T> MaybeSendSync for T