Struct awc::test::TestResponse [−][src]
pub struct TestResponse { /* fields omitted */ }
Expand description
Test ClientResponse
builder
Implementations
pub fn with_header<K, V>(key: K, value: V) -> Self where
HeaderName: TryFrom<K>,
<HeaderName as TryFrom<K>>::Error: Into<HttpError>,
V: IntoHeaderValue,
pub fn with_header<K, V>(key: K, value: V) -> Self where
HeaderName: TryFrom<K>,
<HeaderName as TryFrom<K>>::Error: Into<HttpError>,
V: IntoHeaderValue,
Create TestResponse and set header
pub fn header<K, V>(self, key: K, value: V) -> Self where
HeaderName: TryFrom<K>,
<HeaderName as TryFrom<K>>::Error: Into<HttpError>,
V: IntoHeaderValue,
pub fn header<K, V>(self, key: K, value: V) -> Self where
HeaderName: TryFrom<K>,
<HeaderName as TryFrom<K>>::Error: Into<HttpError>,
V: IntoHeaderValue,
Append a header
Set cookie for this response
Set response’s payload
Complete response creation and generate ClientResponse
instance
Trait Implementations
Returns the “default value” for a type. Read more
Auto Trait Implementations
impl !RefUnwindSafe for TestResponse
impl !Send for TestResponse
impl !Sync for TestResponse
impl Unpin for TestResponse
impl !UnwindSafe for TestResponse
Blanket Implementations
Mutably borrows from an owned value. Read more
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
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