[−][src]Struct httptest::responders::ResponseBuilder
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]
K: TryInto<HeaderName>,
K::Error: Debug,
V: TryInto<HeaderValue>,
V::Error: Debug,
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]
K: TryInto<HeaderName>,
K::Error: Debug,
V: TryInto<HeaderValue>,
V::Error: Debug,
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]
B: Clone + Into<Body> + Send + Debug,
Auto Trait Implementations
impl<B> !RefUnwindSafe for ResponseBuilder<B>
impl<B> Send for ResponseBuilder<B> where
B: Send,
B: Send,
impl<B> Sync for ResponseBuilder<B> where
B: Sync,
B: Sync,
impl<B> Unpin for ResponseBuilder<B> where
B: Unpin,
B: Unpin,
impl<B> !UnwindSafe for ResponseBuilder<B>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
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>,