rama_http_hyperium/into_hyperium/mod.rs
1//! rama-http-types → hyperium `http` conversions.
2
3mod body;
4mod leaf;
5mod message;
6
7pub use body::{HyperiumBody, HyperiumBodyError};
8
9/// Fallibly convert a rama-http-types value into its hyperium [`http`]-crate
10/// equivalent. Sealed; the implemented set is fixed by this crate.
11///
12/// [`http`]: https://docs.rs/http
13pub trait TryIntoHyperiumHttp: crate::sealed::Sealed {
14 /// The hyperium `http` type produced.
15 type Output;
16 /// The conversion error.
17 type Error;
18
19 /// Convert `self` into its hyperium `http` equivalent.
20 fn try_into_hyperium_http(self) -> Result<Self::Output, Self::Error>;
21}