pub struct ResponseMock {
pub status_code: i64,
pub headers: HashMap<String, String>,
pub body: String,
}Expand description
Payload used to mock an entire response without issuing a network request.
Fields§
§status_code: i64HTTP status code to report.
headers: HashMap<String, String>Headers returned to the client.
body: StringBody returned to the client (converted to base64 automatically).
Trait Implementations§
Source§impl Clone for ResponseMock
impl Clone for ResponseMock
Source§fn clone(&self) -> ResponseMock
fn clone(&self) -> ResponseMock
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ResponseMock
impl Debug for ResponseMock
Auto Trait Implementations§
impl Freeze for ResponseMock
impl RefUnwindSafe for ResponseMock
impl Send for ResponseMock
impl Sync for ResponseMock
impl Unpin for ResponseMock
impl UnwindSafe for ResponseMock
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