[−][src]Struct protosocks::CmdRepr
A high-level representation of a Cmd packet.
Fields
ver: Ver
cmd: Cmd
addr: SocksAddr
Implementations
impl CmdRepr
[src]
pub fn parse<T: AsRef<[u8]> + ?Sized>(
packet: &Packet<&T>
) -> Result<CmdRepr, Error>
[src]
packet: &Packet<&T>
) -> Result<CmdRepr, Error>
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]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,