pub struct UrlConstructor { /* private fields */ }
Implementations§
Source§impl UrlConstructor
impl UrlConstructor
pub fn new() -> Self
pub fn scheme<S>(&mut self, scheme: S) -> &mut Self
pub fn userinfo<S>(&mut self, userinfo: S) -> &mut Self
pub fn host<S>(&mut self, host: S) -> &mut Self
Sourcepub fn subdomain<S>(&mut self, subdomain: S) -> &mut Self
pub fn subdomain<S>(&mut self, subdomain: S) -> &mut Self
Subdomains will appear left-to-right in the calling order in the final
URL e.g. calling .host("google.com").subdomain("api").subdomain("v2")
will be built as api.v2.google.com
.
pub fn port(&mut self, port: u16) -> &mut Self
pub fn subdir<S>(&mut self, subdir: S) -> &mut Self
pub fn param<S1, S2>(&mut self, key: S1, value: S2) -> &mut Self
pub fn fragment<S>(&mut self, fragment: S) -> &mut Self
pub fn build(&self) -> String
Trait Implementations§
Source§impl Clone for UrlConstructor
impl Clone for UrlConstructor
Source§fn clone(&self) -> UrlConstructor
fn clone(&self) -> UrlConstructor
Returns a duplicate of the value. Read more
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl Freeze for UrlConstructor
impl RefUnwindSafe for UrlConstructor
impl Send for UrlConstructor
impl Sync for UrlConstructor
impl Unpin for UrlConstructor
impl UnwindSafe for UrlConstructor
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