pub struct Response {
pub status: u16,
pub body: String,
pub headers: Vec<(String, String)>,
}Expand description
One canned response.
headers is how a test hands the client a Link or an X-Total-Count,
which is what paging reads.
Fields§
§status: u16The status code to answer with.
body: StringThe response body, sent back exactly as given.
headers: Vec<(String, String)>Extra headers sent with the response.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Response
impl RefUnwindSafe for Response
impl Send for Response
impl Sync for Response
impl Unpin for Response
impl UnsafeUnpin for Response
impl UnwindSafe for Response
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