pub struct RequestSpec<'a, B = ()>where
B: ?Sized,{
pub method: Method,
pub path: &'a str,
pub query: &'a [(&'a str, Option<String>)],
pub body: Option<&'a B>,
pub extra_headers: &'a [(&'a str, String)],
pub timeout: Option<Duration>,
}Expand description
Low-level request descriptor.
Fields§
§method: Method§path: &'a strPath relative to the base URL, e.g. "/orgs" or "/devices/{id}". Leading
slash optional.
query: &'a [(&'a str, Option<String>)]Query-string parameters. None values are skipped.
body: Option<&'a B>Optional JSON body. Set to None for GET / DELETE.
extra_headers: &'a [(&'a str, String)]Extra headers beyond the defaults (auth, content-type, user-agent).
timeout: Option<Duration>Per-request timeout override (else the transport’s default).
Trait Implementations§
Source§impl<'a, B> Debug for RequestSpec<'a, B>
impl<'a, B> Debug for RequestSpec<'a, B>
Source§impl<B> Default for RequestSpec<'_, B>where
B: ?Sized,
impl<B> Default for RequestSpec<'_, B>where
B: ?Sized,
Source§fn default() -> RequestSpec<'_, B>
fn default() -> RequestSpec<'_, B>
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl<'a, B> Freeze for RequestSpec<'a, B>where
B: ?Sized,
impl<'a, B> RefUnwindSafe for RequestSpec<'a, B>where
B: RefUnwindSafe + ?Sized,
impl<'a, B> Send for RequestSpec<'a, B>
impl<'a, B> Sync for RequestSpec<'a, B>
impl<'a, B> Unpin for RequestSpec<'a, B>where
B: ?Sized,
impl<'a, B> UnsafeUnpin for RequestSpec<'a, B>where
B: ?Sized,
impl<'a, B> UnwindSafe for RequestSpec<'a, B>where
B: RefUnwindSafe + ?Sized,
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