Struct tor_cell::relaycell::hs::IntroduceAck
source · pub struct IntroduceAck { /* private fields */ }
Available on crate feature
hs
only.Expand description
A reply from the introduction point to the client, telling it that its introduce1 was received.
Implementations§
source§impl IntroduceAck
impl IntroduceAck
sourcepub fn new(status_code: IntroduceAckStatus) -> Self
pub fn new(status_code: IntroduceAckStatus) -> Self
Create a new IntroduceAck message with a provided status code.
sourcepub fn status(&self) -> IntroduceAckStatus
pub fn status(&self) -> IntroduceAckStatus
Return the status code from this message.
sourcepub fn success(self) -> Result<IntroduceAck, IntroduceAckStatus>
pub fn success(self) -> Result<IntroduceAck, IntroduceAckStatus>
Checks whether the introduction was a success
If introduction was forwarded successfully,
returns an Ok<IntroduceAck>
, whose .status()
can safely be ignored.
(The extension list may still be of interest.)
Otherwise, returns Err<IntroduceAckStatus>
,
which is suitable for error reporting purposes.
Trait Implementations§
source§impl Body for IntroduceAck
impl Body for IntroduceAck
source§fn decode_from_reader(r: &mut Reader<'_>) -> Result<Self>
fn decode_from_reader(r: &mut Reader<'_>) -> Result<Self>
Decode a relay cell body from a provided reader.
source§fn encode_onto<W: Writer + ?Sized>(self, w: &mut W) -> EncodeResult<()>
fn encode_onto<W: Writer + ?Sized>(self, w: &mut W) -> EncodeResult<()>
Encode the body of this cell into the end of a writer.
source§impl Clone for IntroduceAck
impl Clone for IntroduceAck
source§fn clone(&self) -> IntroduceAck
fn clone(&self) -> IntroduceAck
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 IntroduceAck
impl Debug for IntroduceAck
source§impl From<IntroduceAck> for AnyRelayMsg
impl From<IntroduceAck> for AnyRelayMsg
source§fn from(m: IntroduceAck) -> AnyRelayMsg
fn from(m: IntroduceAck) -> AnyRelayMsg
Converts to this type from the input type.
source§impl RelayMsg for IntroduceAck
impl RelayMsg for IntroduceAck
source§fn encode_onto<W: Writer + ?Sized>(self, w: &mut W) -> EncodeResult<()>
fn encode_onto<W: Writer + ?Sized>(self, w: &mut W) -> EncodeResult<()>
Encode the body of this message, not including command or length
source§impl TryFrom<AnyRelayMsg> for IntroduceAck
impl TryFrom<AnyRelayMsg> for IntroduceAck
source§fn try_from(msg: AnyRelayMsg) -> Result<IntroduceAck>
fn try_from(msg: AnyRelayMsg) -> Result<IntroduceAck>
Performs the conversion.
Auto Trait Implementations§
impl Freeze for IntroduceAck
impl RefUnwindSafe for IntroduceAck
impl Send for IntroduceAck
impl Sync for IntroduceAck
impl Unpin for IntroduceAck
impl UnwindSafe for IntroduceAck
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