pub trait UrlExt {
// Required methods
fn to_local_path(&self) -> Result<Option<PathBuf>>;
fn display(&self) -> impl Display;
}Expand description
Extension trait for Url.
Required Methods§
Sourcefn to_local_path(&self) -> Result<Option<PathBuf>>
fn to_local_path(&self) -> Result<Option<PathBuf>>
Converts the URL to a local path if it uses the file scheme.
Returns Ok(None) if the URL is not a file scheme.
Returns an error if the URL uses a file scheme but cannot be
represented as a local path.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.