Trait HttpTryFrom

Source
pub trait HttpTryFrom<T>: Sized + Sealed {
    type Error: Into<Error>;
}
Expand description

Private trait for the http crate to have generic methods with fallible conversions.

This trait is similar to the TryFrom trait proposed in the standard library, except this is specialized for the http crate and isn’t intended for general consumption.

This trait cannot be implemented types outside of the http crate, and is only intended for use as a generic bound on methods in the http crate.

Required Associated Types§

Source

type Error: Into<Error>

Associated error with the conversion this implementation represents.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl HttpTryFrom<u16> for StatusCode

Source§

impl HttpTryFrom<HeaderName> for HeaderName

Source§

impl HttpTryFrom<HeaderName> for HeaderValue

Source§

impl HttpTryFrom<HeaderValue> for HeaderValue

Source§

impl HttpTryFrom<Bytes> for HeaderName

Source§

impl HttpTryFrom<Bytes> for HeaderValue

Source§

impl HttpTryFrom<Method> for Method

Source§

impl HttpTryFrom<StatusCode> for StatusCode

Source§

impl HttpTryFrom<Url> for Url

Source§

impl<'a> HttpTryFrom<&'a str> for HeaderName

Source§

impl<'a> HttpTryFrom<&'a str> for HeaderValue

Source§

impl<'a> HttpTryFrom<&'a str> for Method

Source§

impl<'a> HttpTryFrom<&'a str> for StatusCode

Source§

impl<'a> HttpTryFrom<&'a str> for Url

Source§

impl<'a> HttpTryFrom<&'a [u8]> for HeaderName

Source§

impl<'a> HttpTryFrom<&'a [u8]> for HeaderValue

Source§

impl<'a> HttpTryFrom<&'a [u8]> for Method

Source§

impl<'a> HttpTryFrom<&'a [u8]> for StatusCode