[−][src]Struct awc::test::TestResponse
Test ClientResponse
builder
Methods
impl TestResponse
[src]
pub fn with_header<K, V>(key: K, value: V) -> Self where
HeaderName: HttpTryFrom<K>,
V: IntoHeaderValue,
[src]
HeaderName: HttpTryFrom<K>,
V: IntoHeaderValue,
Create TestResponse and set header
pub fn version(self, ver: Version) -> Self
[src]
Set HTTP version of this response
pub fn set<H: Header>(self, hdr: H) -> Self
[src]
Set a header
pub fn header<K, V>(self, key: K, value: V) -> Self where
HeaderName: HttpTryFrom<K>,
V: IntoHeaderValue,
[src]
HeaderName: HttpTryFrom<K>,
V: IntoHeaderValue,
Append a header
pub fn cookie(self, cookie: Cookie) -> Self
[src]
Set cookie for this response
pub fn set_payload<B: Into<Bytes>>(self, data: B) -> Self
[src]
Set response's payload
pub fn finish(self) -> ClientResponse
[src]
Complete response creation and generate ClientResponse
instance
Trait Implementations
impl Default for TestResponse
[src]
fn default() -> TestResponse
[src]
Auto Trait Implementations
impl !Sync for TestResponse
impl !Send for TestResponse
impl Unpin for TestResponse
impl !RefUnwindSafe for TestResponse
impl !UnwindSafe for TestResponse
Blanket Implementations
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Erased for T
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,