Skip to main content

IntoUrl

Trait IntoUrl 

Source
pub trait IntoUrl {
    // Required methods
    fn to_url(self) -> Result<Url, ParseError>;
    fn as_str(&self) -> &str;
}
Expand description

A trait to try to convert some type into a Url.

Required Methods§

Source

fn to_url(self) -> Result<Url, ParseError>

Parse as a valid Url

Source

fn as_str(&self) -> &str

Returns the string representation of the 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 &str

Source§

impl IntoUrl for String

Source§

impl IntoUrl for Url

Implementors§

Source§

impl IntoUrl for nym_http_api_client::Url