[][src]Struct protosocks::CmdRepr

pub struct CmdRepr {
    pub ver: Ver,
    pub cmd: Cmd,
    pub addr: SocksAddr,
}

A high-level representation of a Cmd packet.

Fields

ver: Vercmd: Cmdaddr: SocksAddr

Implementations

impl CmdRepr[src]

pub fn parse<T: AsRef<[u8]> + ?Sized>(
    packet: &Packet<&T>
) -> Result<CmdRepr, Error>
[src]

Parse a packet and return a high-level representation.

pub fn buffer_len(&self) -> usize[src]

Return the length of that will be emitted from this high-level representation.

pub fn emit<T: AsRef<[u8]> + AsMut<[u8]>>(&self, packet: &mut Packet<T>)[src]

Emit a high-level representation into a packet.

Trait Implementations

impl Clone for CmdRepr[src]

impl Debug for CmdRepr[src]

impl Decoder<CmdRepr> for CmdRepr[src]

impl Encoder<CmdRepr> for CmdRepr[src]

impl Eq for CmdRepr[src]

impl PartialEq<CmdRepr> for CmdRepr[src]

impl StructuralEq for CmdRepr[src]

impl StructuralPartialEq for CmdRepr[src]

Auto Trait Implementations

impl RefUnwindSafe for CmdRepr

impl Send for CmdRepr

impl Sync for CmdRepr

impl Unpin for CmdRepr

impl UnwindSafe for CmdRepr

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.