pub struct IsahcClient {
pub http_client: HttpClient,
pub body_buf_default_capacity: usize,
}Fields§
§http_client: HttpClient§body_buf_default_capacity: usizeImplementations§
Source§impl IsahcClient
impl IsahcClient
pub fn new() -> Result<Self, IsahcError>
pub fn with(http_client: IsahcHttpClient) -> Self
Trait Implementations§
Source§impl Client for IsahcClient
impl Client for IsahcClient
type RespondError = Error
fn respond<'life0, 'async_trait>(
&'life0 self,
request: Request<Body>,
) -> Pin<Box<dyn Future<Output = Result<Response<Body>, Self::RespondError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn respond_endpoint<'life0, 'life1, 'async_trait, EP>( &'life0 self, endpoint: &'life1 EP, ) -> Pin<Box<dyn Future<Output = Result<<EP as Endpoint>::ParseResponseOutput, ClientRespondEndpointError<Self::RespondError, <EP as Endpoint>::RenderRequestError, <EP as Endpoint>::ParseResponseError>>> + Send + 'async_trait>>
fn respond_endpoint_with_callback<'life0, 'life1, 'async_trait, EP, PreRCB, PostRCB>( &'life0 self, endpoint: &'life1 EP, pre_request_callback: PreRCB, post_request_callback: PostRCB, ) -> Pin<Box<dyn Future<Output = Result<<EP as Endpoint>::ParseResponseOutput, ClientRespondEndpointError<Self::RespondError, <EP as Endpoint>::RenderRequestError, <EP as Endpoint>::ParseResponseError>>> + Send + 'async_trait>>
fn respond_dyn_endpoint<'life0, 'life1, 'async_trait, RRE, PRO, PRE>( &'life0 self, endpoint: &'life1 (dyn Endpoint<ParseResponseOutput = PRO, ParseResponseError = PRE, RenderRequestError = RRE> + Sync + Send), ) -> Pin<Box<dyn Future<Output = Result<PRO, ClientRespondEndpointError<Self::RespondError, RRE, PRE>>> + Send + 'async_trait>>
fn respond_dyn_endpoint_with_callback<'life0, 'life1, 'async_trait, RRE, PRO, PRE, PreRCB, PostRCB>(
&'life0 self,
endpoint: &'life1 (dyn Endpoint<ParseResponseOutput = PRO, ParseResponseError = PRE, RenderRequestError = RRE> + Sync + Send),
pre_request_callback: PreRCB,
post_request_callback: PostRCB,
) -> Pin<Box<dyn Future<Output = Result<PRO, ClientRespondEndpointError<Self::RespondError, RRE, PRE>>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
RRE: Error + Send + Sync + 'static + 'async_trait,
PRE: Error + Send + Sync + 'static + 'async_trait,
PreRCB: FnMut(Request<Vec<u8>>) -> Request<Vec<u8>> + Send + 'async_trait,
PostRCB: FnMut(&Response<Vec<u8>>) + Send + 'async_trait,
PRO: 'async_trait,
Self: Sync + 'async_trait,
Source§impl Clone for IsahcClient
impl Clone for IsahcClient
Source§fn clone(&self) -> IsahcClient
fn clone(&self) -> IsahcClient
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for IsahcClient
impl Debug for IsahcClient
Source§impl RetryableClient for IsahcClient
impl RetryableClient for IsahcClient
fn sleep<'life0, 'async_trait>(
&'life0 self,
dur: Duration,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn respond_endpoint_until_done<'life0, 'life1, 'async_trait, EP>(
&'life0 self,
endpoint: &'life1 EP,
) -> Pin<Box<dyn Future<Output = Result<<EP as RetryableEndpoint>::ParseResponseOutput, RetryableClientRespondEndpointUntilDoneError<Self::RespondError, <EP as RetryableEndpoint>::RenderRequestError, <EP as RetryableEndpoint>::ParseResponseError>>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
EP: RetryableEndpoint + Send + Sync + 'async_trait,
Self: Sync + 'async_trait,
fn respond_endpoint_until_done_with_callback<'life0, 'life1, 'async_trait, EP, PreRCB, PostRCB>(
&'life0 self,
endpoint: &'life1 EP,
pre_request_callback: PreRCB,
post_request_callback: PostRCB,
) -> Pin<Box<dyn Future<Output = Result<<EP as RetryableEndpoint>::ParseResponseOutput, RetryableClientRespondEndpointUntilDoneError<Self::RespondError, <EP as RetryableEndpoint>::RenderRequestError, <EP as RetryableEndpoint>::ParseResponseError>>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
EP: RetryableEndpoint + Send + Sync + 'async_trait,
PreRCB: FnMut(Request<Vec<u8>>, Option<&RetryableEndpointRetry<<EP as RetryableEndpoint>::RetryReason>>) -> Request<Vec<u8>> + Send + 'async_trait,
PostRCB: FnMut(&Response<Vec<u8>>, Option<&RetryableEndpointRetry<<EP as RetryableEndpoint>::RetryReason>>) + Send + 'async_trait,
Self: Sync + 'async_trait,
Auto Trait Implementations§
impl Freeze for IsahcClient
impl !RefUnwindSafe for IsahcClient
impl Send for IsahcClient
impl Sync for IsahcClient
impl Unpin for IsahcClient
impl UnsafeUnpin for IsahcClient
impl !UnwindSafe for IsahcClient
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