pub struct Client { /* private fields */ }Expand description
Manages http client network connectivity.
Implementations§
source§impl Client
impl Client
sourcepub fn build<A, U, T, F>(addr: U, connector: F) -> ClientBuilder
pub fn build<A, U, T, F>(addr: U, connector: F) -> ClientBuilder
Configure and build client
sourcepub fn with_default<A, U>(addr: U) -> ClientBuilder
pub fn with_default<A, U>(addr: U) -> ClientBuilder
Configure and build client
sourcepub async fn send(
&self,
method: Method,
path: ByteString,
headers: HeaderMap,
eof: bool,
) -> Result<(SendStream, RecvStream), ClientError>
pub async fn send( &self, method: Method, path: ByteString, headers: HeaderMap, eof: bool, ) -> Result<(SendStream, RecvStream), ClientError>
Send request to the peer
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Client
impl !RefUnwindSafe for Client
impl !Send for Client
impl !Sync for Client
impl Unpin for Client
impl !UnwindSafe for Client
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit)