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
sourceimpl 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
sourceimpl Body for Destroy
impl Body for Destroy
sourcefn into_message(self) -> ChanMsg
fn into_message(self) -> ChanMsg
Convert this type into a ChanMsg, wrapped as appropriate.
sourcefn write_body_onto<W: Writer + ?Sized>(self, w: &mut W) -> EncodeResult<()>
fn write_body_onto<W: Writer + ?Sized>(self, w: &mut W) -> EncodeResult<()>
Consume this message and encode its body onto
w. Read moreAuto Trait Implementations
impl RefUnwindSafe for Destroy
impl Send for Destroy
impl Sync for Destroy
impl Unpin for Destroy
impl UnwindSafe for Destroy
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more