Skip to main content

HarBody

Trait HarBody 

pub trait HarBody: Sync {
    // Required method
    fn reader(
        &self,
    ) -> impl Future<Output = Result<impl AsyncRead + Unpin + Send, Box<dyn Error + Send + Sync>>> + Send;
}
Available on crate features http and std only.
Expand description

A stable body that can be reopened for encoding detection and serialization. Each reader must yield the same bytes. Implementations can borrow memory or stream from files and other storage; no inspection dependency is required.

Required Methods§

fn reader( &self, ) -> impl Future<Output = Result<impl AsyncRead + Unpin + Send, Box<dyn Error + Send + Sync>>> + Send

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

§

impl HarBody for &[u8]

§

async fn reader( &self, ) -> Result<impl AsyncRead + Unpin + Send, Box<dyn Error + Send + Sync>>

Implementors§