Struct salvo_core::test::TestClient

source ·
pub struct TestClient;
Available on crate feature test only.
Expand description

TestClient is a type that can carry settings over multiple requests. The settings applied to the TestClient are applied to every request created from this TestClient.

Implementations§

Create a new RequestBuilder with the GET method and this TestClient’s settings applied on it.

Create a new RequestBuilder with the POST method and this TestClient’s settings applied on it.

Create a new RequestBuilder with the PUT method and this TestClient’s settings applied on it.

Create a new RequestBuilder with the DELETE method and this TestClient’s settings applied on it.

Create a new RequestBuilder with the HEAD method and this TestClient’s settings applied on it.

Create a new RequestBuilder with the OPTIONS method and this TestClient’s settings applied on it.

Create a new RequestBuilder with the PATCH method and this TestClient’s settings applied on it.

Create a new RequestBuilder with the TRACE method and this TestClient’s settings applied on it.

Trait Implementations§

Formats the value using the given formatter. Read more
Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Should always be Self
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.
Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more