pub struct Truncated { /* private fields */ }
Expand description
A Truncated message is sent to the client when the remaining hops of a circuit have gone away.
NOTE: Current Tor implementations often treat Truncated messages and Destroy messages interchangeably. Truncated was intended to be a “soft” Destroy, that would leave the unaffected parts of a circuit still usable.
Implementations
sourceimpl Truncated
impl Truncated
sourcepub fn new(reason: DestroyReason) -> Self
pub fn new(reason: DestroyReason) -> Self
Construct a new truncated message.
sourcepub fn reason(self) -> DestroyReason
pub fn reason(self) -> DestroyReason
Get the provided reason to truncate the circuit.
Trait Implementations
sourceimpl Body for Truncated
impl Body for Truncated
sourcefn into_message(self) -> RelayMsg
fn into_message(self) -> RelayMsg
Convert this type into a RelayMsg, wrapped appropriate.
sourcefn 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.
sourcefn encode_onto(self, w: &mut Vec<u8>)
fn encode_onto(self, w: &mut Vec<u8>)
Encode the body of this cell into the end of a vec.
Auto Trait Implementations
impl RefUnwindSafe for Truncated
impl Send for Truncated
impl Sync for Truncated
impl Unpin for Truncated
impl UnwindSafe for Truncated
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
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
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more