Skip to main content

TryIntoRamaHttp

Trait TryIntoRamaHttp 

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

    // Required method
    fn try_into_rama_http(self) -> Result<Self::Output, Self::Error>;
}
Available on crate features http and std only.
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§

type Output

The rama-http-types type produced.

type Error

The conversion error.

Required Methods§

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§

§

impl TryIntoRamaHttp for &HeaderMap

§

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.

§

type Output = HeaderMap

§

type Error = Error

§

impl TryIntoRamaHttp for HeaderMap

§

impl TryIntoRamaHttp for Method

§

impl TryIntoRamaHttp for Parts

§

impl TryIntoRamaHttp for Parts

§

impl TryIntoRamaHttp for StatusCode

§

impl TryIntoRamaHttp for Uri

§

impl TryIntoRamaHttp for Version

§

impl<T> TryIntoRamaHttp for Request<T>

§

impl<T> TryIntoRamaHttp for Response<T>

Implementors§