ClientixStreamInterface

Trait ClientixStreamInterface 

Source
pub trait ClientixStreamInterface<T>: Stream {
    // Required methods
    fn version(&self) -> Version;
    fn content_length(&self) -> Option<u64>;
    fn status(&self) -> StatusCode;
    fn url(&self) -> &Url;
    fn remote_addr(&self) -> Option<SocketAddr>;
    fn headers(&self) -> &HeaderMap;
    async fn execute<F>(self, handle: F)
       where F: FnMut(ClientixResult<T>);
    async fn collect(self) -> ClientixResult<Vec<T>>;
}

Required Methods§

Source

fn version(&self) -> Version

Source

fn content_length(&self) -> Option<u64>

Source

fn status(&self) -> StatusCode

Source

fn url(&self) -> &Url

Source

fn remote_addr(&self) -> Option<SocketAddr>

Source

fn headers(&self) -> &HeaderMap

Source

async fn execute<F>(self, handle: F)
where F: FnMut(ClientixResult<T>),

Source

async fn collect(self) -> ClientixResult<Vec<T>>

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§