[][src]Struct httptest::responders::ResponseBuilder

pub struct ResponseBuilder<B>(_);

Convenient ResponseBuilder that implements Responder.

Methods

impl<B> ResponseBuilder<B>[src]

pub fn version(self, version: Version) -> Self[src]

Set the http version.

pub fn insert_header<K, V>(self, name: K, value: V) -> Self where
    K: TryInto<HeaderName>,
    K::Error: Debug,
    V: TryInto<HeaderValue>,
    V::Error: Debug
[src]

Insert the provided header. Replacing any header that already exists with the same name.

pub fn append_header<K, V>(self, name: K, value: V) -> Self where
    K: TryInto<HeaderName>,
    K::Error: Debug,
    V: TryInto<HeaderValue>,
    V::Error: Debug
[src]

Insert the provided header. Appending the value to any header that already exists with the same name.

pub fn body<B2>(self, body: B2) -> ResponseBuilder<B2>[src]

Set the body of the header.

Trait Implementations

impl<B: Debug> Debug for ResponseBuilder<B>[src]

impl<B> Responder for ResponseBuilder<B> where
    B: Clone + Into<Body> + Send + Debug
[src]

Auto Trait Implementations

impl<B> !RefUnwindSafe for ResponseBuilder<B>

impl<B> Send for ResponseBuilder<B> where
    B: Send

impl<B> Sync for ResponseBuilder<B> where
    B: Sync

impl<B> Unpin for ResponseBuilder<B> where
    B: Unpin

impl<B> !UnwindSafe for ResponseBuilder<B>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.