Struct tor_cell::chancell::msg::Unrecognized
source · 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) -> Selfwhere
B: Into<Vec<u8>>,
pub fn new<B>(cmd: ChanCmd, content: B) -> Selfwhere B: Into<Vec<u8>>,
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.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 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 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