[]Struct yukikaze::rt::client::generated::GLOBAL_CLIENT

pub struct GLOBAL_CLIENT { /* fields omitted */ }

Global client instance

Methods from Deref<Target = Client<DefaultCfg>>

pub async fn request<'_>(&'_ self, req: Request) -> RequestResult[src]

Sends request, and returns response

pub async fn send<'_>(
    &'_ self,
    req: Request
) -> Result<RequestResult, Expired<impl Future<Output = RequestResult>, C::Timer>>
[src]

Sends request and returns response. Timed version.

On timeout error it returns async_timer::timed::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 async fn send_redirect(
    &'static self,
    req: Request
) -> Result<RequestResult, Expired<impl Future<Output = RequestResult> + 'static, C::Timer>>
[src]

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

On timeout error it returns async_timer::timed::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 async fn redirect_request<'_>(&'_ self, req: Request) -> RequestResult[src]

Sends request and returns response, while handling redirects.

Trait Implementations

impl Deref for GLOBAL_CLIENT

type Target = Client<DefaultCfg>

The resulting type after dereferencing.

impl LazyStatic for GLOBAL_CLIENT

Auto Trait Implementations

Blanket Implementations

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

impl<T, U> Into<U> for T where
    U: From<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> Erased for T