Struct Request
struct Request { ... }
A request which can be executed with Client::execute().
Implementations
impl Request
fn new(method: Method, url: Url) -> SelfConstructs a new request.
fn method(self: &Self) -> &MethodGet the method.
fn method_mut(self: &mut Self) -> &mut MethodGet a mutable reference to the method.
fn url(self: &Self) -> &UrlGet the url.
fn url_mut(self: &mut Self) -> &mut UrlGet a mutable reference to the url.
fn headers(self: &Self) -> &HeaderMapGet the headers.
fn headers_mut(self: &mut Self) -> &mut HeaderMapGet a mutable reference to the headers.
fn version(self: &Self) -> VersionGet the http version.
fn version_mut(self: &mut Self) -> &mut VersionGet a mutable reference to the http version.
fn body(self: &Self) -> Option<&Body>Get the body.
fn body_mut(self: &mut Self) -> &mut Option<Body>Get a mutable reference to the body.
fn timeout(self: &Self) -> Option<&Duration>Get the timeout.
fn timeout_mut(self: &mut Self) -> &mut Option<Duration>Get a mutable reference to the timeout.
fn try_clone(self: &Self) -> Option<Request>Attempts to clone the
Request.None is returned if a body is which can not be cloned. This can be because the body is a stream.
impl Debug for Request
fn fmt(self: &Self, f: &mut Formatter<'_>) -> Result
impl Freeze for Request
impl RefUnwindSafe for Request
impl Send for Request
impl Sync for Request
impl Unpin for Request
impl UnsafeUnpin for Request
impl UnwindSafe for Request
impl<T> Any for Request
fn type_id(self: &Self) -> TypeId
impl<T> Borrow for Request
fn borrow(self: &Self) -> &T
impl<T> BorrowMut for Request
fn borrow_mut(self: &mut Self) -> &mut T
impl<T> ErasedDestructor for Request
impl<T> From for Request
fn from(t: T) -> TReturns the argument unchanged.
impl<T> Instrument for Request
impl<T> PolicyExt for Request
fn and<P, B, E>(self: Self, other: P) -> And<T, P> where T: Policy<B, E>, P: Policy<B, E>fn or<P, B, E>(self: Self, other: P) -> Or<T, P> where T: Policy<B, E>, P: Policy<B, E>
impl<T> TryFrom for Request
fn try_from(req: HttpRequest<T>) -> Result<Self>
impl<T> WithSubscriber for Request
impl<T, U> Into for Request
fn into(self: Self) -> UCalls
U::from(self).That is, this conversion is whatever the implementation of
[From]<T> for Uchooses to do.
impl<T, U> TryFrom for Request
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
impl<T, U> TryInto for Request
fn try_into(self: Self) -> Result<U, <U as TryFrom<T>>::Error>