Struct monoio_http_client::Client
source · [−]pub struct Client<C = PooledConnector<TcpConnector, Key, TcpStream>, CS = PooledConnector<TlsConnector, Key, ClientTlsStream<TcpStream>>> { /* private fields */ }
Implementations
sourceimpl Client
impl Client
pub fn new() -> Self
pub fn get<U>(&self, uri: U) -> ClientRequestwhere
Uri: TryFrom<U>,
<Uri as TryFrom<U>>::Error: Into<Error>,
pub fn post<U>(&self, uri: U) -> ClientRequestwhere
Uri: TryFrom<U>,
<Uri as TryFrom<U>>::Error: Into<Error>,
pub fn put<U>(&self, uri: U) -> ClientRequestwhere
Uri: TryFrom<U>,
<Uri as TryFrom<U>>::Error: Into<Error>,
pub fn patch<U>(&self, uri: U) -> ClientRequestwhere
Uri: TryFrom<U>,
<Uri as TryFrom<U>>::Error: Into<Error>,
pub fn delete<U>(&self, uri: U) -> ClientRequestwhere
Uri: TryFrom<U>,
<Uri as TryFrom<U>>::Error: Into<Error>,
pub fn head<U>(&self, uri: U) -> ClientRequestwhere
Uri: TryFrom<U>,
<Uri as TryFrom<U>>::Error: Into<Error>,
pub fn request<M, U>(&self, method: M, uri: U) -> ClientRequestwhere
Method: TryFrom<M>,
<Method as TryFrom<M>>::Error: Into<Error>,
Uri: TryFrom<U>,
<Uri as TryFrom<U>>::Error: Into<Error>,
pub async fn send(
&self,
request: Request<Payload>
) -> Result<Response<Payload>, Error>
Trait Implementations
Auto Trait Implementations
impl<C, CS> RefUnwindSafe for Client<C, CS>where
C: RefUnwindSafe,
CS: RefUnwindSafe,
impl<C = PooledConnector<TcpConnector, Key, TcpStream>, CS = PooledConnector<TlsConnector<TcpConnector>, Key, Stream<TcpStream, ClientConnection>>> !Send for Client<C, CS>
impl<C = PooledConnector<TcpConnector, Key, TcpStream>, CS = PooledConnector<TlsConnector<TcpConnector>, Key, Stream<TcpStream, ClientConnection>>> !Sync for Client<C, CS>
impl<C, CS> Unpin for Client<C, CS>
impl<C, CS> UnwindSafe for Client<C, CS>where
C: RefUnwindSafe,
CS: RefUnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more