pub struct NadeoRequestBuilder { /* private fields */ }Expand description
Used for creating NadeoRequests.
URL, Method and AuthType must be provided.
Implementations§
Source§impl NadeoRequestBuilder
impl NadeoRequestBuilder
pub fn url(self, url: &str) -> Self
pub fn method(self, method: Method) -> Self
pub fn auth_type(self, auth_type: AuthType) -> Self
Sourcepub fn add_header<K>(self, key: K, val: &str) -> Selfwhere
K: IntoHeaderName,
pub fn add_header<K>(self, key: K, val: &str) -> Selfwhere
K: IntoHeaderName,
Adds a header to the request. Adding a header should not be required in most cases.
§Panics
Panics if there is an error parsing the value.
Sourcepub fn build(self) -> Result<NadeoRequest>
pub fn build(self) -> Result<NadeoRequest>
Converts the NadeoRequestBuilder into a NadeoRequest.
URL, Method and AuthType are required.
Trait Implementations§
Source§impl Default for NadeoRequestBuilder
impl Default for NadeoRequestBuilder
Source§fn default() -> NadeoRequestBuilder
fn default() -> NadeoRequestBuilder
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for NadeoRequestBuilder
impl RefUnwindSafe for NadeoRequestBuilder
impl Send for NadeoRequestBuilder
impl Sync for NadeoRequestBuilder
impl Unpin for NadeoRequestBuilder
impl UnwindSafe for NadeoRequestBuilder
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