#[non_exhaustive]pub enum CircRequestExt {
CcRequest(CcRequest),
ProofOfWork(ProofOfWork),
SubprotocolRequest(SubprotocolRequest),
Unrecognized(UnrecognizedExt<CircRequestExtType>),
}
Expand description
An extension to be sent along with a circuit extension request (CREATE2, EXTEND2, or INTRODUCE.)
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.
CcRequest(CcRequest)
Request to enable congestion control.
ProofOfWork(ProofOfWork)
Available on crate feature
hs
only.HS-only: Provide a proof-of-work solution.
SubprotocolRequest(SubprotocolRequest)
Request to enable one or more subprotocol capabilities.
Unrecognized(UnrecognizedExt<CircRequestExtType>)
An extension of a type we do not recognize, or which we have not encoded.
Implementations§
Source§impl CircRequestExt
impl CircRequestExt
Sourcepub fn write_many_onto<W: Writer>(
exts: &[Self],
out: &mut W,
) -> EncodeResult<()>
pub fn write_many_onto<W: Writer>( exts: &[Self], out: &mut W, ) -> EncodeResult<()>
Encode a set of extensions into a “message” for a circuit handshake.
Trait Implementations§
Source§impl Clone for CircRequestExt
impl Clone for CircRequestExt
Source§fn clone(&self) -> CircRequestExt
fn clone(&self) -> CircRequestExt
Returns a duplicate 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 CircRequestExt
impl Debug for CircRequestExt
Source§impl From<CcRequest> for CircRequestExt
impl From<CcRequest> for CircRequestExt
Source§fn from(val: CcRequest) -> CircRequestExt
fn from(val: CcRequest) -> CircRequestExt
Converts to this type from the input type.
Source§impl From<ProofOfWork> for CircRequestExt
Available on crate feature hs
only.
impl From<ProofOfWork> for CircRequestExt
Available on crate feature
hs
only.Source§fn from(val: ProofOfWork) -> CircRequestExt
fn from(val: ProofOfWork) -> CircRequestExt
Converts to this type from the input type.
Source§impl From<SubprotocolRequest> for CircRequestExt
impl From<SubprotocolRequest> for CircRequestExt
Source§fn from(val: SubprotocolRequest) -> CircRequestExt
fn from(val: SubprotocolRequest) -> CircRequestExt
Converts to this type from the input type.
Source§impl From<UnrecognizedExt<CircRequestExtType>> for CircRequestExt
impl From<UnrecognizedExt<CircRequestExtType>> for CircRequestExt
Source§fn from(val: UnrecognizedExt<CircRequestExtType>) -> CircRequestExt
fn from(val: UnrecognizedExt<CircRequestExtType>) -> CircRequestExt
Converts to this type from the input type.
Source§impl PartialEq for CircRequestExt
impl PartialEq for CircRequestExt
Source§impl Readable for CircRequestExt
impl Readable for CircRequestExt
Source§impl Writeable for CircRequestExt
impl Writeable for CircRequestExt
Source§fn write_onto<B: Writer + ?Sized>(&self, b: &mut B) -> EncodeResult<()>
fn write_onto<B: Writer + ?Sized>(&self, b: &mut B) -> EncodeResult<()>
Encode this object into the writer
b
.impl StructuralPartialEq for CircRequestExt
Auto Trait Implementations§
impl Freeze for CircRequestExt
impl RefUnwindSafe for CircRequestExt
impl Send for CircRequestExt
impl Sync for CircRequestExt
impl Unpin for CircRequestExt
impl UnwindSafe for CircRequestExt
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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,
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn 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>
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)
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)
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
impl<T> DowncastSend for T
§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§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.