pub trait ResourcePath {
// Required method
fn path(&self) -> &str;
// Provided method
fn unquote(s: &str) -> Cow<'_, str> { ... }
}Expand description
A path source, e.g. a string or an urly::Url.
Required Methods§
Provided Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".
Implementations on Foreign Types§
Source§impl ResourcePath for Url
Path segments are percent-decoded, escapes that would not decode to
valid utf-8 are kept percent-encoded.
impl ResourcePath for Url
Path segments are percent-decoded, escapes that would not decode to valid utf-8 are kept percent-encoded.
Segments are decoded after the path is split on /, so parameter
values can contain any character, including / and %. For example
/files/..%2F..%2Fetc matches /files/{name} with name set to
../../etc. Such values must be validated before they are used, e.g.
as a file system path.