pub struct RequestBuilder { /* private fields */ }Expand description
Build up a request. Usually this just allows you to add parameters before sending.
Implementations§
Source§impl RequestBuilder
impl RequestBuilder
Sourcepub fn new(pve: &Pve, path: String, method: RequestMethod) -> Self
pub fn new(pve: &Pve, path: String, method: RequestMethod) -> Self
Creates a new RequestBuilder pulling client and base URL from
Pve. Path specifies the sub path for the endpoint.
Sourcepub fn add_parameter<S: Into<String>>(self, name: S, value: S) -> Self
pub fn add_parameter<S: Into<String>>(self, name: S, value: S) -> Self
Since this will always be encoded in www-form-urlencoded it can be
represented in a HashMap<String, String> just fine. This will
init and add to a HashMap which is encoded when Self::send is
called.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for RequestBuilder
impl !RefUnwindSafe for RequestBuilder
impl Send for RequestBuilder
impl Sync for RequestBuilder
impl Unpin for RequestBuilder
impl UnsafeUnpin for RequestBuilder
impl !UnwindSafe for RequestBuilder
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