pub trait HttpUriExt {
// Required methods
fn extend_dir_with_path(self, path: &str) -> Result<Uri, Error>;
fn append_query_parameter(
self,
key: &str,
value: &str,
) -> Result<Uri, Error>;
fn join(&self, relative: &str) -> Result<Uri, Error>;
}Required Methods§
Sourcefn extend_dir_with_path(self, path: &str) -> Result<Uri, Error>
fn extend_dir_with_path(self, path: &str) -> Result<Uri, Error>
Appends / to self’s path if it does not already end with one, then appends path,
preserving any query parameters. Does nothing if path is the empty string. Note that
empty paths on URIs with authorities are implicitly normalized to start with / by
http::Uri.
Will error if path contains invalid URI characters, or if the resulting URI parts are
invalid (e.g., combining an authority and path without a scheme).
Sourcefn append_query_parameter(self, key: &str, value: &str) -> Result<Uri, Error>
fn append_query_parameter(self, key: &str, value: &str) -> Result<Uri, Error>
Append the given query parameter key=value to the URI, preserving existing query
parameters if any, key and value should already be URL-encoded (if necessary).
Will only error if key or value contains invalid URI characters.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".