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.