Skip to main content

IntoUrl

Trait IntoUrl 

Source
pub trait IntoUrl: Sealed {
    // Required method
    fn into_url(self) -> Result<Url, BuildRequestError>;
}
Expand description

A type that can be converted into a Url.

Implemented for Url itself and for strings, so URLs can be passed as "https://example.org/path" without an explicit parse step. This trait is sealed, i.e., it cannot be implemented outside this crate.

Required Methods§

Source

fn into_url(self) -> Result<Url, BuildRequestError>

Converts the value into a parsed Url.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementations on Foreign Types§

Source§

impl IntoUrl for &String

Source§

impl IntoUrl for &str

Source§

impl IntoUrl for String

Source§

impl IntoUrl for Url

Implementors§