Skip to main content

HasUrl

Trait HasUrl 

Source
pub trait HasUrl {
    // Required methods
    fn url(&self) -> Option<&str>;
    fn original_url(&self) -> Option<&str>;

    // Provided method
    fn get_url(&self) -> Option<&str> { ... }
}
Expand description

URL fields shared by payloads that store both final and original URLs.

Required Methods§

Source

fn url(&self) -> Option<&str>

The URL that ended up serving content, after redirects.

Source

fn original_url(&self) -> Option<&str>

The original URL before redirects.

Provided Methods§

Source

fn get_url(&self) -> Option<&str>

Return the final URL, falling back to the original URL.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§