pub struct IntroduceHandshakePayload { /* private fields */ }
hs
only.Expand description
The plaintext of the encrypted portion of an INTRODUCE{1,2} message.
This is not a RelayMsg itself; it is instead used as the payload for an
hs-ntor
handshake, which is passed to the onion service in Introduce[12]
message.
This payload is sent from a client to the onion service to tell it how to reach the client’s chosen rendezvous point.
This corresponds to the “decrypted payload” in section 3.3 of rend-spec-v3.txt, excluding the PAD field.
The user of this type is expected to discard, or generate, appropriate padding, as required.
Implementations§
Source§impl IntroduceHandshakePayload
impl IntroduceHandshakePayload
Sourcepub fn new(
cookie: RendCookie,
onion_key: OnionKey,
link_specifiers: Vec<EncodedLinkSpec>,
proof_of_work: Option<ProofOfWork>,
) -> Self
pub fn new( cookie: RendCookie, onion_key: OnionKey, link_specifiers: Vec<EncodedLinkSpec>, proof_of_work: Option<ProofOfWork>, ) -> Self
Construct a new IntroduceHandshakePayload
Return the rendezvous cookie specified in this handshake payload.
Sourcepub fn onion_key(&self) -> &OnionKey
pub fn onion_key(&self) -> &OnionKey
Return the provided onion key for the specified rendezvous point
Sourcepub fn link_specifiers(&self) -> &[EncodedLinkSpec]
pub fn link_specifiers(&self) -> &[EncodedLinkSpec]
Return the provided link specifiers for the specified rendezvous point.
Sourcepub fn proof_of_work_extension(&self) -> Option<&ProofOfWork>
pub fn proof_of_work_extension(&self) -> Option<&ProofOfWork>
Return the proof-of-work extension for the specified rendezvous point.
Trait Implementations§
Source§impl Clone for IntroduceHandshakePayload
impl Clone for IntroduceHandshakePayload
Source§fn clone(&self) -> IntroduceHandshakePayload
fn clone(&self) -> IntroduceHandshakePayload
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for IntroduceHandshakePayload
impl Debug for IntroduceHandshakePayload
Source§impl Readable for IntroduceHandshakePayload
impl Readable for IntroduceHandshakePayload
Source§impl Writeable for IntroduceHandshakePayload
impl Writeable for IntroduceHandshakePayload
Source§fn write_onto<B: Writer + ?Sized>(&self, w: &mut B) -> EncodeResult<()>
fn write_onto<B: Writer + ?Sized>(&self, w: &mut B) -> EncodeResult<()>
b
.Auto Trait Implementations§
impl Freeze for IntroduceHandshakePayload
impl RefUnwindSafe for IntroduceHandshakePayload
impl Send for IntroduceHandshakePayload
impl Sync for IntroduceHandshakePayload
impl Unpin for IntroduceHandshakePayload
impl UnwindSafe for IntroduceHandshakePayload
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
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>
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>
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)
&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)
&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>
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>
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>
b
, and consume it.