pub struct MockResponse {
pub status: u16,
pub headers: BTreeMap<String, String>,
pub body: Option<Value>,
pub delay_ms: Option<u64>,
}Expand description
The response emitted when a MockRequestMatch succeeds.
Fields§
§status: u16§headers: BTreeMap<String, String>§body: Option<Value>§delay_ms: Option<u64>Optional deterministic delay before sending the response, in milliseconds. A hard upper bound keeps a typo from stalling CI.
Trait Implementations§
Source§impl Clone for MockResponse
impl Clone for MockResponse
Source§impl Debug for MockResponse
impl Debug for MockResponse
Source§impl<'de> Deserialize<'de> for MockResponse
impl<'de> Deserialize<'de> for MockResponse
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for MockResponse
Source§impl PartialEq for MockResponse
impl PartialEq for MockResponse
Source§impl Serialize for MockResponse
impl Serialize for MockResponse
impl StructuralPartialEq for MockResponse
Auto Trait Implementations§
impl Freeze for MockResponse
impl RefUnwindSafe for MockResponse
impl Send for MockResponse
impl Sync for MockResponse
impl Unpin for MockResponse
impl UnsafeUnpin for MockResponse
impl UnwindSafe for MockResponse
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