pub struct Unrecognized { /* private fields */ }Expand description
Holds any message whose command we don’t recognize.
Well-behaved Tor implementations are required to ignore commands like this.
TODO: I believe that this is not a risky case of Postel’s law, since it is only for channels, but we should be careful here.
Implementations§
source§impl Unrecognized
impl Unrecognized
sourcepub fn new<B>(cmd: ChanCmd, content: B) -> Self
pub fn new<B>(cmd: ChanCmd, content: B) -> Self
Construct a new cell of arbitrary or unrecognized type.
sourcepub fn decode_with_cmd(cmd: ChanCmd, r: &mut Reader<'_>) -> Result<Unrecognized>
pub fn decode_with_cmd(cmd: ChanCmd, r: &mut Reader<'_>) -> Result<Unrecognized>
Take an unrecognized cell’s body from a reader r, and apply
the given command to it.
Trait Implementations§
source§impl Body for Unrecognized
impl Body for Unrecognized
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 Clone for Unrecognized
impl Clone for Unrecognized
source§fn clone(&self) -> Unrecognized
fn clone(&self) -> Unrecognized
Returns a copy of the value. Read more
1.6.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 Unrecognized
impl Debug for Unrecognized
source§impl From<Unrecognized> for AnyChanMsg
impl From<Unrecognized> for AnyChanMsg
source§fn from(u: Unrecognized) -> AnyChanMsg
fn from(u: Unrecognized) -> AnyChanMsg
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for Unrecognized
impl RefUnwindSafe for Unrecognized
impl Send for Unrecognized
impl Sync for Unrecognized
impl Unpin for Unrecognized
impl UnwindSafe for Unrecognized
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)source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§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