Struct Client
struct Client<C, B> { ... }
A Client to make outgoing HTTP requests.
Client is cheap to clone and cloning is the recommended way to share a Client. The
underlying connection pool will be reused.
Implementations
impl Client<(), ()>
fn builder<E>(executor: E) -> Builder where E: Executor<Pin<Box<dyn Future<Output = ()> + Send>>> + Send + Sync + Clone + 'staticCreate a builder to configure a new
Client.Example
# # #
impl<C, B> Client<C, B>
fn get(self: &Self, uri: Uri) -> ResponseFuture where B: DefaultSend a
GETrequest to the suppliedUri.Note
This requires that the
Bodytype have aDefaultimplementation. It should return an "empty" version of itself, such thatBody::is_end_streamistrue.Example
# # #fn request(self: &Self, req: Request<B>) -> ResponseFutureSend a constructed
Requestusing thisClient.Example
# # #
impl<C, B> Debug for Client<C, B>
fn fmt(self: &Self, f: &mut Formatter<'_>) -> Result
impl<C, B> Freeze for Client<C, B>
impl<C, B> RefUnwindSafe for Client<C, B>
impl<C, B> Send for Client<C, B>
impl<C, B> Service for Client<C, B>
fn poll_ready(self: &mut Self, _: &mut Context<'_>) -> Poll<Result<(), <Self as >::Error>>fn call(self: &mut Self, req: Request<B>) -> <Self as >::Future
impl<C, B> Sync for Client<C, B>
impl<C, B> Unpin for Client<C, B>
impl<C, B> UnsafeUnpin for Client<C, B>
impl<C, B> UnwindSafe for Client<C, B>
impl<C: Clone, B> Clone for Client<C, B>
fn clone(self: &Self) -> Client<C, B>
impl<T> Any for Client<C, B>
fn type_id(self: &Self) -> TypeId
impl<T> Borrow for Client<C, B>
fn borrow(self: &Self) -> &T
impl<T> BorrowMut for Client<C, B>
fn borrow_mut(self: &mut Self) -> &mut T
impl<T> CloneToUninit for Client<C, B>
unsafe fn clone_to_uninit(self: &Self, dest: *mut u8)
impl<T> From for Client<C, B>
fn from(t: T) -> TReturns the argument unchanged.
impl<T> Instrument for Client<C, B>
impl<T> ToOwned for Client<C, B>
fn to_owned(self: &Self) -> Tfn clone_into(self: &Self, target: &mut T)
impl<T> WithSubscriber for Client<C, B>
impl<T, U> Into for Client<C, B>
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 Client<C, B>
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
impl<T, U> TryInto for Client<C, B>
fn try_into(self: Self) -> Result<U, <U as TryFrom<T>>::Error>