Struct httptest::responders::ResponseBuilder
source · pub struct ResponseBuilder<B>(/* private fields */);
Expand description
Convenient ResponseBuilder that implements Responder.
Implementations§
source§impl<B> ResponseBuilder<B>
impl<B> ResponseBuilder<B>
sourcepub fn insert_header<K, V>(self, name: K, value: V) -> Self
pub fn insert_header<K, V>(self, name: K, value: V) -> Self
Insert the provided header. Replacing any header that already exists with the same name.
sourcepub fn append_header<K, V>(self, name: K, value: V) -> Self
pub fn append_header<K, V>(self, name: K, value: V) -> Self
Insert the provided header. Appending the value to any header that already exists with the same name.
sourcepub fn body<B2>(self, body: B2) -> ResponseBuilder<B2>
pub fn body<B2>(self, body: B2) -> ResponseBuilder<B2>
Set the body of the header.
Trait Implementations§
source§impl<B: Debug> Debug for ResponseBuilder<B>
impl<B: Debug> Debug for ResponseBuilder<B>
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§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more