pub struct AsyncTestClient<C: Connect> { /* private fields */ }Expand description
Client interface for issuing requests to an [AsyncTestServer].
Most methods return an AsyncTestRequestBuilder that can be used to
build a request.
Implementations§
Source§impl<C: Connect + Clone + Send + Sync + 'static> AsyncTestClient<C>
impl<C: Connect + Clone + Send + Sync + 'static> AsyncTestClient<C>
Sourcepub async fn request(&self, request: Request<Body>) -> Result<AsyncTestResponse>
pub async fn request(&self, request: Request<Body>) -> Result<AsyncTestResponse>
Performs the given Request using this AsyncTestClient
Sourcepub fn head(
&self,
uri: impl TryInto<Uri, Error: Into<Error>>,
) -> AsyncTestRequestBuilder<'_, C>
pub fn head( &self, uri: impl TryInto<Uri, Error: Into<Error>>, ) -> AsyncTestRequestBuilder<'_, C>
Begin constructing a HEAD request using this AsyncTestClient
Sourcepub fn get(
&self,
uri: impl TryInto<Uri, Error: Into<Error>>,
) -> AsyncTestRequestBuilder<'_, C>
pub fn get( &self, uri: impl TryInto<Uri, Error: Into<Error>>, ) -> AsyncTestRequestBuilder<'_, C>
Begin constructing a GET request using this AsyncTestClient
Sourcepub fn options(
&self,
uri: impl TryInto<Uri, Error: Into<Error>>,
) -> AsyncTestRequestBuilder<'_, C>
pub fn options( &self, uri: impl TryInto<Uri, Error: Into<Error>>, ) -> AsyncTestRequestBuilder<'_, C>
Begin constructing an OPTIONS request using this AsyncTestClient
Sourcepub fn post(
&self,
uri: impl TryInto<Uri, Error: Into<Error>>,
) -> AsyncTestRequestBuilder<'_, C>
pub fn post( &self, uri: impl TryInto<Uri, Error: Into<Error>>, ) -> AsyncTestRequestBuilder<'_, C>
Begin constructing a POST request using this AsyncTestClient
Sourcepub fn put(
&self,
uri: impl TryInto<Uri, Error: Into<Error>>,
) -> AsyncTestRequestBuilder<'_, C>
pub fn put( &self, uri: impl TryInto<Uri, Error: Into<Error>>, ) -> AsyncTestRequestBuilder<'_, C>
Begin constructing a PUT request using this AsyncTestClient
Sourcepub fn patch(
&self,
uri: impl TryInto<Uri, Error: Into<Error>>,
) -> AsyncTestRequestBuilder<'_, C>
pub fn patch( &self, uri: impl TryInto<Uri, Error: Into<Error>>, ) -> AsyncTestRequestBuilder<'_, C>
Begin constructing a PATCH request using this AsyncTestClient
Sourcepub fn delete(
&self,
uri: impl TryInto<Uri, Error: Into<Error>>,
) -> AsyncTestRequestBuilder<'_, C>
pub fn delete( &self, uri: impl TryInto<Uri, Error: Into<Error>>, ) -> AsyncTestRequestBuilder<'_, C>
Begin constructing a DELETE request using this AsyncTestClient
Sourcepub fn build_request(&self) -> AsyncTestRequestBuilder<'_, C>
pub fn build_request(&self) -> AsyncTestRequestBuilder<'_, C>
Begin constructing a request using this AsyncTestClient
Trait Implementations§
Auto Trait Implementations§
impl<C> Freeze for AsyncTestClient<C>where
C: Freeze,
impl<C> !RefUnwindSafe for AsyncTestClient<C>
impl<C> Send for AsyncTestClient<C>where
C: Send,
impl<C> Sync for AsyncTestClient<C>where
C: Sync,
impl<C> Unpin for AsyncTestClient<C>where
C: Unpin,
impl<C> UnsafeUnpin for AsyncTestClient<C>where
C: UnsafeUnpin,
impl<C> !UnwindSafe for AsyncTestClient<C>
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