[−][src]Struct yukikaze::client::Client
HTTP Client
Methods
impl<C: Config> Client<C> where
<C::Connector as Service<Uri>>::Error: Into<Box<dyn Error + Send + Sync + 'static>>,
<C::Connector as Service<Uri>>::Future: Send + Unpin,
<C::Connector as Service<Uri>>::Response: AsyncRead + AsyncWrite + Connection + Unpin + Send, [src]
<C::Connector as Service<Uri>>::Error: Into<Box<dyn Error + Send + Sync + 'static>>,
<C::Connector as Service<Uri>>::Future: Send + Unpin,
<C::Connector as Service<Uri>>::Response: AsyncRead + AsyncWrite + Connection + Unpin + Send,
pub fn new() -> Client<C>[src]
Creates new instance of client with specified configuration.
Use Default if you'd like to use default config.
pub async fn request<'_>(&'_ self, __arg1: Request) -> RequestResult[src]
Sends request, and returns response
pub async fn send<'_>(
&'_ self,
__arg1: Request
) -> Result<RequestResult, Expired<impl Future<Output = RequestResult>, C::Timer>>[src]
&'_ self,
__arg1: Request
) -> Result<RequestResult, Expired<impl Future<Output = RequestResult>, C::Timer>>
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 async fn send_redirect(
&'static self,
req: Request
) -> Result<RequestResult, Expired<impl Future<Output = RequestResult> + 'static, C::Timer>>[src]
&'static self,
req: Request
) -> Result<RequestResult, Expired<impl Future<Output = RequestResult> + 'static, C::Timer>>
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 async fn redirect_request<'_>(&'_ self, __arg1: Request) -> RequestResult[src]
Sends request and returns response, while handling redirects.
Trait Implementations
Auto Trait Implementations
impl<C> Sync for Client<C> where
C: Sync,
<C as Config>::Connector: Sync,
C: Sync,
<C as Config>::Connector: Sync,
impl<C> Send for Client<C> where
C: Send,
<C as Config>::Connector: Send,
C: Send,
<C as Config>::Connector: Send,
impl<C> Unpin for Client<C> where
C: Unpin,
<C as Config>::Connector: Unpin,
C: Unpin,
<C as Config>::Connector: Unpin,
impl<C = DefaultCfg> !UnwindSafe for Client<C>
impl<C = DefaultCfg> !RefUnwindSafe for Client<C>
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T> From<T> for T[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T[src]
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Same<T> for T
type Output = T
Should always be Self