Install & Compatibility
Where this runs
No compatibility data collected yet for this library.
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
Body
✓ use http_body::Body;
Implement the Body trait for a custom HTTP body type.
use http_body::Body;
use bytes::Bytes;
struct MyBody;
impl Body for MyBody {
type Data = Bytes;
type Error = std::io::Error;
fn poll_data(self: std::pin::Pin<&mut Self>, cx: &mut std::task::Context<'_>) -> std::task::Poll<Option<Result<Self::Data, Self::Error>>> {
std::task::Poll::Ready(None)
}
fn poll_trailers(self: std::pin::Pin<&mut Self>, cx: &mut std::task::Context<'_>) -> std::task::Poll<Result<Option<http::HeaderMap>, Self::Error>> {
std::task::Poll::Ready(Ok(None))
}
}
Debug
Known issues
No known issues recorded.
Audit
Dependencies
No dependency data recorded yet.