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§
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>>
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.