Struct actix_web::client::test::TestResponse [−][src]
pub struct TestResponse { /* fields omitted */ }
Expand description
Test ClientResponse
builder
Implementations
pub fn with_header<K, V>(key: K, value: V) -> TestResponse where
V: IntoHeaderValue,
HeaderName: TryFrom<K>,
<HeaderName as TryFrom<K>>::Error: Into<Error>,
pub fn with_header<K, V>(key: K, value: V) -> TestResponse where
V: IntoHeaderValue,
HeaderName: TryFrom<K>,
<HeaderName as TryFrom<K>>::Error: Into<Error>,
Create TestResponse and set header
Set HTTP version of this response
Set a header
pub fn header<K, V>(self, key: K, value: V) -> TestResponse where
V: IntoHeaderValue,
HeaderName: TryFrom<K>,
<HeaderName as TryFrom<K>>::Error: Into<Error>,
pub fn header<K, V>(self, key: K, value: V) -> TestResponse where
V: IntoHeaderValue,
HeaderName: TryFrom<K>,
<HeaderName as TryFrom<K>>::Error: Into<Error>,
Append a header
Set cookie for this response
Set response’s payload
pub fn finish(
self
) -> ClientResponse<Pin<Box<dyn Stream<Item = Result<Bytes, PayloadError>> + 'static, Global>>>
pub fn finish(
self
) -> ClientResponse<Pin<Box<dyn Stream<Item = Result<Bytes, PayloadError>> + 'static, Global>>>
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