Struct pact_models::generators::JsonHandler
source · pub struct JsonHandler {
pub value: Value,
}
Expand description
Implementation of a content type handler for JSON
Fields§
§value: Value
JSON document to apply the generators to.
Trait Implementations§
source§impl ContentTypeHandler<Value> for JsonHandler
impl ContentTypeHandler<Value> for JsonHandler
source§fn process_body(
&mut self,
generators: &HashMap<DocPath, Generator>,
mode: &GeneratorTestMode,
context: &HashMap<&str, Value>,
matcher: &Box<dyn VariantMatcher + Send + Sync>
) -> Result<OptionalBody, String>
fn process_body( &mut self, generators: &HashMap<DocPath, Generator>, mode: &GeneratorTestMode, context: &HashMap<&str, Value>, matcher: &Box<dyn VariantMatcher + Send + Sync> ) -> Result<OptionalBody, String>
Processes the body using the map of generators, returning a (possibly) updated body.
Auto Trait Implementations§
impl RefUnwindSafe for JsonHandler
impl Send for JsonHandler
impl Sync for JsonHandler
impl Unpin for JsonHandler
impl UnwindSafe for JsonHandler
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