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
Sourcepub async fn client(&self) -> Result<SimpleClient, ClientError>
pub async fn client(&self) -> Result<SimpleClient, ClientError>
Get client from the pool
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