Skip to main content

TryIntoRamaHttp

Trait TryIntoRamaHttp 

Source
pub trait TryIntoRamaHttp: Sealed {
    type Output;
    type Error;

    // Required method
    fn try_into_rama_http(self) -> Result<Self::Output, Self::Error>;
}
Expand description

Fallibly convert a hyperium http-crate value into its rama-http-types equivalent. Sealed; the implemented set is fixed by this crate.

Required Associated Types§

Source

type Output

The rama-http-types type produced.

Source

type Error

The conversion error.

Required Methods§

Source

fn try_into_rama_http(self) -> Result<Self::Output, Self::Error>

Convert self into its rama-http-types equivalent.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementations on Foreign Types§

Source§

impl TryIntoRamaHttp for &HeaderMap

Source§

fn try_into_rama_http(self) -> Result<HeaderMap, Error>

Borrowing variant, for boundaries that only hand out a &http::HeaderMap (e.g. a multer multipart field). Iterating by reference already repeats the name per value, so no multi-value bookkeeping is needed.

Source§

type Output = HeaderMap

Source§

type Error = Error

Source§

impl TryIntoRamaHttp for HeaderMap

Source§

impl TryIntoRamaHttp for Method

Source§

impl TryIntoRamaHttp for Parts

Source§

impl TryIntoRamaHttp for Parts

Source§

impl TryIntoRamaHttp for StatusCode

Source§

impl TryIntoRamaHttp for Uri

Source§

impl TryIntoRamaHttp for Version

Source§

impl<T> TryIntoRamaHttp for Request<T>

Source§

impl<T> TryIntoRamaHttp for Response<T>

Implementors§