Trait socks5_impl::protocol::StreamOperation

source ·
pub trait StreamOperation {
    // Required methods
    fn retrieve_from_stream<R>(stream: &mut R) -> Result<Self>
       where R: Read,
             Self: Sized;
    fn write_to_buf<B: BufMut>(&self, buf: &mut B);
    fn len(&self) -> usize;

    // Provided methods
    fn write_to_stream<W: Write>(&self, w: &mut W) -> Result<()> { ... }
    fn is_empty(&self) -> bool { ... }
}

Required Methods§

source

fn retrieve_from_stream<R>(stream: &mut R) -> Result<Self>
where R: Read, Self: Sized,

source

fn write_to_buf<B: BufMut>(&self, buf: &mut B)

source

fn len(&self) -> usize

Provided Methods§

source

fn write_to_stream<W: Write>(&self, w: &mut W) -> Result<()>

source

fn is_empty(&self) -> bool

Object Safety§

This trait is not object safe.

Implementors§

source§

impl StreamOperation for Address

source§

impl StreamOperation for socks5_impl::protocol::handshake::password_method::Request

source§

impl StreamOperation for socks5_impl::protocol::handshake::password_method::Response

source§

impl StreamOperation for socks5_impl::protocol::handshake::Request

source§

impl StreamOperation for socks5_impl::protocol::handshake::Response

source§

impl StreamOperation for socks5_impl::protocol::Request

source§

impl StreamOperation for socks5_impl::protocol::Response

source§

impl StreamOperation for UdpHeader