pub struct MockRequestMatch {
pub headers: BTreeMap<String, String>,
pub query: BTreeMap<String, String>,
pub path: BTreeMap<String, String>,
pub body: Option<Value>,
}Expand description
Exact request predicates for a mock scenario.
Header, query, and path predicates are strings because HTTP transports are
string based. body deliberately remains JSON to allow a scenario to
match an entire structured request body without inventing another query
language.
Fields§
§headers: BTreeMap<String, String>§query: BTreeMap<String, String>§path: BTreeMap<String, String>§body: Option<Value>Trait Implementations§
Source§impl Clone for MockRequestMatch
impl Clone for MockRequestMatch
Source§impl Debug for MockRequestMatch
impl Debug for MockRequestMatch
Source§impl Default for MockRequestMatch
impl Default for MockRequestMatch
Source§impl<'de> Deserialize<'de> for MockRequestMatch
impl<'de> Deserialize<'de> for MockRequestMatch
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 MockRequestMatch
Source§impl PartialEq for MockRequestMatch
impl PartialEq for MockRequestMatch
Source§impl Serialize for MockRequestMatch
impl Serialize for MockRequestMatch
impl StructuralPartialEq for MockRequestMatch
Auto Trait Implementations§
impl Freeze for MockRequestMatch
impl RefUnwindSafe for MockRequestMatch
impl Send for MockRequestMatch
impl Sync for MockRequestMatch
impl Unpin for MockRequestMatch
impl UnsafeUnpin for MockRequestMatch
impl UnwindSafe for MockRequestMatch
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