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