IntoUri

Trait IntoUri 

Source
pub trait IntoUri: Sealed {
    type TryInto;

    // Required method
    fn into_uri(self) -> Self::TryInto;
}
Expand description

A helper trait to try to convert some types into Uri.

This trait is sealed and implemented only for the most suitable types.

Unlike the similar trait in the Reqwest, this one describes a type’s representation that implements TryInto<Uri>. This approach can pass third-party types like url::Url directly to the http::request::Builder::uri without any wrappers.

Required Associated Types§

Source

type TryInto

Which kind of value should be converted to the Uri via TryInto<Uri>

Required Methods§

Source

fn into_uri(self) -> Self::TryInto

Converts this value into the input type for the TryInto<Uri> conversion.

Implementations on Foreign Types§

Source§

impl IntoUri for &str

Source§

type TryInto = &str

Source§

fn into_uri(self) -> Self::TryInto

Source§

impl IntoUri for &String

Source§

impl IntoUri for &Uri

Source§

type TryInto = &Uri

Source§

fn into_uri(self) -> Self::TryInto

Source§

impl IntoUri for &[u8]

Source§

type TryInto = &[u8]

Source§

fn into_uri(self) -> Self::TryInto

Source§

impl IntoUri for String

Source§

impl IntoUri for Vec<u8>

Source§

type TryInto = Vec<u8>

Source§

fn into_uri(self) -> Self::TryInto

Source§

impl IntoUri for Parts

Source§

impl IntoUri for Uri

Source§

impl IntoUri for Url

Source§

impl<'a> IntoUri for &'a Vec<u8>

Source§

type TryInto = &'a [u8]

Source§

fn into_uri(self) -> Self::TryInto

Source§

impl<'a> IntoUri for &'a Url

Source§

type TryInto = &'a str

Source§

fn into_uri(self) -> Self::TryInto

Implementors§