pub struct Builder { /* private fields */ }
Expand description
See Client::get()
Make a new request by constructing the request URL bit by bit
Implementations§
source§impl Builder
impl Builder
sourcepub fn path(self, url_part: &'static str) -> Self
pub fn path(self, url_part: &'static str) -> Self
Add a constant path to the request, e.g. .path("users")
Inner slashes are OK, but the string must not start or end with a slash.
Panics if query string has been added.
It’s appended raw, so must be URL-safe.
sourcepub fn arg(self, arg: &str) -> Self
pub fn arg(self, arg: &str) -> Self
Add a user-supplied argument to the request path, e.g. .path("users").arg(username)
,
or after a call to query()
, starts adding fragments to the query string with no delimiters.
The arg is URL-escaped, so it’s safe to use any user-supplied data.
Auto Trait Implementations§
impl !Freeze for Builder
impl !RefUnwindSafe for Builder
impl Send for Builder
impl Sync for Builder
impl Unpin for Builder
impl !UnwindSafe for Builder
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