pub struct DestroyCell {
pub circ_id: u32,
pub reason: CloseReason,
pub reason_int: u8,
pub unused: Vec<u8>,
}Expand description
Circuit teardown cell.
DESTROY cells are sent to tear down a circuit. They include a reason code explaining why the circuit is being closed.
§Wire Format
[ CircID ][ 4 (DESTROY) ][ Reason (1) ][ Padding ]§Example
use stem_rs::client::cell::DestroyCell;
use stem_rs::client::datatype::CloseReason;
let cell = DestroyCell::new(1, CloseReason::Requested);Fields§
§circ_id: u32Circuit ID to destroy.
reason: CloseReasonReason for closing the circuit.
reason_int: u8Integer value of the reason.
unused: Vec<u8>Unused padding bytes.
Implementations§
Source§impl DestroyCell
impl DestroyCell
Trait Implementations§
Source§impl Clone for DestroyCell
impl Clone for DestroyCell
Source§fn clone(&self) -> DestroyCell
fn clone(&self) -> DestroyCell
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 DestroyCell
impl Debug for DestroyCell
Source§impl PartialEq for DestroyCell
impl PartialEq for DestroyCell
impl StructuralPartialEq for DestroyCell
Auto Trait Implementations§
impl Freeze for DestroyCell
impl RefUnwindSafe for DestroyCell
impl Send for DestroyCell
impl Sync for DestroyCell
impl Unpin for DestroyCell
impl UnwindSafe for DestroyCell
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