Trait Urlify

Source
pub trait Urlify {
    // Required method
    fn url(&self) -> &Url;

    // Provided methods
    fn relative_base_and_url(&self) -> Option<(&Url, String)> { ... }
    fn relative_url(&self) -> Option<String> { ... }
    fn relative_base(&self) -> Option<&Url> { ... }
    fn possibly_relative_url(&self) -> String { ... }
}
Expand description

Get a URL from something

§Relative URLs

A entity can provide a relative URL. This is an optional operation, and is not implemented by default.

Implementors of this feature should have a clear definition what the meaning of the base is. For example: the advisory’s base is the distribution URL.

The combination of the provided actual base and relative URL must result in the same value as the actual URL.

Required Methods§

Source

fn url(&self) -> &Url

The URL

Provided Methods§

Implementations on Foreign Types§

Source§

impl<T, E> Urlify for Result<T, E>
where T: Urlify, E: Urlify,

Source§

fn url(&self) -> &Url

Implementors§

Source§

impl<S, D> Urlify for RetrievalError<D, S>
where D: Urlify, S: Source,