pub struct Destroy { /* private fields */ }
Expand description
The Destroy message tears down a circuit.
On receiving a Destroy message, a Tor implementation should tear down the associated circuit, and pass the destroy message down the circuit to later/earlier hops on the circuit (if any).
Implementations§
source§impl Destroy
impl Destroy
sourcepub fn new(reason: DestroyReason) -> Self
pub fn new(reason: DestroyReason) -> Self
Create a new destroy cell.
sourcepub fn reason(&self) -> DestroyReason
pub fn reason(&self) -> DestroyReason
Return the provided reason for destroying the circuit.
Trait Implementations§
source§impl Body for Destroy
impl Body for Destroy
source§fn encode_onto<W: Writer + ?Sized>(self, w: &mut W) -> EncodeResult<()>
fn encode_onto<W: Writer + ?Sized>(self, w: &mut W) -> EncodeResult<()>
Consume this message and encode its body onto
w
. Read moresource§fn decode_from_reader(r: &mut Reader<'_>) -> Result<Self>
fn decode_from_reader(r: &mut Reader<'_>) -> Result<Self>
Decode a channel cell body from a provided reader.
source§impl ChanMsg for Destroy
impl ChanMsg for Destroy
source§fn encode_onto<W: Writer + ?Sized>(self, w: &mut W) -> EncodeResult<()>
fn encode_onto<W: Writer + ?Sized>(self, w: &mut W) -> EncodeResult<()>
Write the body of this message (not including length or command).
source§impl From<Destroy> for AnyChanMsg
impl From<Destroy> for AnyChanMsg
source§fn from(m: Destroy) -> AnyChanMsg
fn from(m: Destroy) -> AnyChanMsg
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for Destroy
impl RefUnwindSafe for Destroy
impl Send for Destroy
impl Sync for Destroy
impl Unpin for Destroy
impl UnwindSafe for Destroy
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<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