Enum tor_cell::relaycell::extend::NtorV3Extension
source · #[non_exhaustive]pub enum NtorV3Extension {
RequestCongestionControl,
AckCongestionControl {
sendme_inc: u8,
},
Unrecognized {
field_type: NtorV3ExtensionType,
data: Vec<u8>,
},
}
Expand description
A piece of extension data, to be encoded as the message in an ntor v3 handshake.
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.
RequestCongestionControl
Request congestion control be enabled for this circuit (client → exit node).
(EXT_FIELD_TYPE
= 01)
AckCongestionControl
Acknowledge a congestion control request (exit node → client).
(EXT_FIELD_TYPE
= 02)
Unrecognized
An unknown piece of extension data.
Fields
§
field_type: NtorV3ExtensionType
The extension type (EXT_FIELD_TYPE
).
Implementations§
source§impl NtorV3Extension
impl NtorV3Extension
sourcepub fn write_many_onto<W: Writer>(
exts: &[NtorV3Extension],
out: &mut W,
) -> EncodeResult<()>
pub fn write_many_onto<W: Writer>( exts: &[NtorV3Extension], out: &mut W, ) -> EncodeResult<()>
Encode a set of extensions into a “message” for an ntor v3 handshake.
Trait Implementations§
source§impl Clone for NtorV3Extension
impl Clone for NtorV3Extension
source§fn clone(&self) -> NtorV3Extension
fn clone(&self) -> NtorV3Extension
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for NtorV3Extension
impl Debug for NtorV3Extension
source§impl PartialEq for NtorV3Extension
impl PartialEq for NtorV3Extension
source§impl Readable for NtorV3Extension
impl Readable for NtorV3Extension
source§impl Writeable for NtorV3Extension
impl Writeable for NtorV3Extension
source§fn write_onto<W: Writer + ?Sized>(&self, out: &mut W) -> EncodeResult<()>
fn write_onto<W: Writer + ?Sized>(&self, out: &mut W) -> EncodeResult<()>
Encode this object into the writer
b
.impl Eq for NtorV3Extension
impl StructuralPartialEq for NtorV3Extension
Auto Trait Implementations§
impl Freeze for NtorV3Extension
impl RefUnwindSafe for NtorV3Extension
impl Send for NtorV3Extension
impl Sync for NtorV3Extension
impl Unpin for NtorV3Extension
impl UnwindSafe for NtorV3Extension
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
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
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
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 moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
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§impl<T> WithSubscriber for T
impl<T> WithSubscriber for T
§fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where
S: Into<Dispatch>,
§fn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
source§impl<W> WriteableOnce for Wwhere
W: Writeable,
impl<W> WriteableOnce for Wwhere
W: Writeable,
source§fn write_into<B>(self, b: &mut B) -> Result<(), EncodeError>
fn write_into<B>(self, b: &mut B) -> Result<(), EncodeError>
Encode this object into the writer
b
, and consume it.