[][src]Struct protosocks::UdpFrag

pub struct UdpFrag {
    pub frag: u8,
    pub addr: SocksAddr,
    pub payload: Bytes,
}

A high-level representation of a UDP frag packet.

Fields

frag: u8addr: SocksAddrpayload: Bytes

Implementations

impl Frag[src]

pub fn new_frags(addr: SocksAddr, payload: Bytes) -> Vec<Self>[src]

pub fn parse<T: AsRef<[u8]> + ?Sized>(
    packet: &Packet<&T>
) -> Result<Frag, 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 Frag[src]

impl Debug for Frag[src]

impl Decoder<Frag> for Frag[src]

impl Encoder<Frag> for Frag[src]

impl Eq for Frag[src]

impl PartialEq<Frag> for Frag[src]

impl StructuralEq for Frag[src]

impl StructuralPartialEq for Frag[src]

Auto Trait Implementations

impl RefUnwindSafe for Frag

impl Send for Frag

impl Sync for Frag

impl Unpin for Frag

impl UnwindSafe for Frag

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.