pub struct ObjectMatcher { /* private fields */ }Implementations§
Source§impl ObjectMatcher
impl ObjectMatcher
pub fn new() -> Self
pub fn of(fields: HashMap<String, Box<dyn JsonMatcher>>) -> Self
pub fn allow_unexpected_keys(self) -> Self
pub fn field(self, key: &str, value: impl JsonMatcher + 'static) -> Self
Trait Implementations§
Source§impl Default for ObjectMatcher
impl Default for ObjectMatcher
Source§impl JsonMatcher for ObjectMatcher
impl JsonMatcher for ObjectMatcher
fn json_matches(&self, value: &Value) -> Vec<JsonMatcherError>
Auto Trait Implementations§
impl Freeze for ObjectMatcher
impl !RefUnwindSafe for ObjectMatcher
impl !Send for ObjectMatcher
impl !Sync for ObjectMatcher
impl Unpin for ObjectMatcher
impl !UnwindSafe for ObjectMatcher
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