[][src]Struct yukikaze::rt::client::generated::Request

pub struct Request(pub Request);

Global request

Implements Deref and DerefMut to access regular yukikaze's request.

Methods

impl Request[src]

pub fn request(self) -> impl Future<Output = RequestResult>[src]

Sends request, and returns future that resolves to response

pub fn send(
    self
) -> impl Future<Output = Result<RequestResult, Expired<impl Future<Output = RequestResult>, impl Oneshot>>>
[src]

Sends request and returns response. Timed version.

On timeout error it returns async_timer::Expired as Error Expired implements Future that can be used to re-spawn ongoing request again.

If request resolves in time returns Result<response::Response, hyper::Error> as Ok variant.

pub fn send_redirect(
    self
) -> impl Future<Output = Result<RequestResult, Expired<impl Future<Output = RequestResult> + 'static, impl Oneshot>>>
[src]

Sends request and returns response, while handling redirects. Timed version.

On timeout error it returns async_timer::Expired as Error Expired implements Future that can be used to re-spawn ongoing request again.

If request resolves in time returns Result<response::Response, hyper::Error> as Ok variant.

pub fn redirect_request(self) -> impl Future<Output = RequestResult>[src]

Sends request and returns response, while handling redirects.

Methods from Deref<Target = Request>

pub fn method(&self) -> &Method[src]

Returns reference to method.

pub fn method_mut(&mut self) -> &mut Method[src]

Returns mutable reference to method.

pub fn headers(&self) -> &HeaderMap[src]

Returns reference to headers.

pub fn headers_mut(&mut self) -> &mut HeaderMap[src]

Returns mutable reference to headers.

pub fn uri(&self) -> &Uri[src]

Returns reference to uri.

pub fn uri_mut(&mut self) -> &mut Uri[src]

Returns mutable reference to uri.

pub fn extensions(&self) -> &Extensions[src]

Retrieves reference to http extension map

pub fn extensions_mut(&mut self) -> &mut Extensions[src]

Retrieves mutable reference to http extension map

pub fn extract_extensions(&mut self) -> Extensions[src]

Extracts extensions out and leaves empty in Self

Trait Implementations

impl DerefMut for Request[src]

impl Deref for Request[src]

type Target = Request

The resulting type after dereferencing.

Auto Trait Implementations

impl Sync for Request

impl Send for Request

impl Unpin for Request

impl !UnwindSafe for Request

impl !RefUnwindSafe for Request

Blanket Implementations

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self