#[non_exhaustive]pub struct HttpRequest {
pub method: String,
pub url: String,
pub headers: Vec<(String, String)>,
pub body: Option<Vec<u8>>,
pub timeout: Duration,
}Expand description
One request, as a Transport sends it.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.method: StringGET, POST…
url: StringThe whole address, with the query.
headers: Vec<(String, String)>The headers, in the order they are sent.
body: Option<Vec<u8>>The body of a call that sends one: a multipart form.
timeout: DurationHow long the call may take.
Implementations§
Trait Implementations§
Source§impl Clone for HttpRequest
impl Clone for HttpRequest
Source§impl Debug for HttpRequest
impl Debug for HttpRequest
impl Eq for HttpRequest
Source§impl PartialEq for HttpRequest
impl PartialEq for HttpRequest
impl StructuralPartialEq for HttpRequest
Auto Trait Implementations§
impl Freeze for HttpRequest
impl RefUnwindSafe for HttpRequest
impl Send for HttpRequest
impl Sync for HttpRequest
impl Unpin for HttpRequest
impl UnsafeUnpin for HttpRequest
impl UnwindSafe for HttpRequest
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