pub struct FormatUrl<'a> { /* private fields */ }
Expand description
A collection of all the components and configuration that together serialize into a URL.
Implementations§
Source§impl<'a> FormatUrl<'a>
impl<'a> FormatUrl<'a>
Sourcepub fn disable_encoding(self) -> Self
pub fn disable_encoding(self) -> Self
In rare cases you may need the query parameter key/value pairs not to be encoded.
Sourcepub fn format_url(self) -> String
pub fn format_url(self) -> String
Takes all of the provided arguments and turns them into a single URL to fetch.
Sourcepub fn with_path_template(self, path_template: &'a str) -> Self
pub fn with_path_template(self, path_template: &'a str) -> Self
Add a path, optionally marking sections for substitution using :key
.
Sourcepub fn with_query_params(self, params: Vec<(&'a str, &'a str)>) -> Self
pub fn with_query_params(self, params: Vec<(&'a str, &'a str)>) -> Self
Add some query parameters.
Sourcepub fn with_substitutes(self, substitutes: Vec<(&'a str, &'a str)>) -> Self
pub fn with_substitutes(self, substitutes: Vec<(&'a str, &'a str)>) -> Self
Add substitutes to substitute matching :key
sequences in the path template.
Auto Trait Implementations§
impl<'a> Freeze for FormatUrl<'a>
impl<'a> RefUnwindSafe for FormatUrl<'a>
impl<'a> Send for FormatUrl<'a>
impl<'a> Sync for FormatUrl<'a>
impl<'a> Unpin for FormatUrl<'a>
impl<'a> UnwindSafe for FormatUrl<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more