pub trait ClientStream: Sized + Send + Sync {
    // Required methods
    fn request(&mut self, req: &[u8]) -> Result<Buffer, Error>;
    fn connect<P>(path: P) -> Result<AgentClient<Self>, Error>
       where P: AsRef<Path> + Send;

    // Provided method
    fn connect_env() -> Result<AgentClient<Self>, Error> { ... }
}

Required Methods§

source

fn request(&mut self, req: &[u8]) -> Result<Buffer, Error>

Send an agent request through the stream and read the response.

source

fn connect<P>(path: P) -> Result<AgentClient<Self>, Error>
where P: AsRef<Path> + Send,

How to connect the streaming socket

Provided Methods§

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl ClientStream for UnixStream

source§

fn connect<P>(path: P) -> Result<AgentClient<Self>, Error>
where P: AsRef<Path> + Send,

source§

fn request(&mut self, msg: &[u8]) -> Result<Buffer, Error>

Implementors§