Module pact_matching::models [−][src]
Expand description
The models
module provides all the structures required to model a Pact.
Re-exports
pub use crate::models::message::Message; | |
pub use crate::models::message_pact::MessagePact; |
Modules
expression_parser | expression parser for generator expressions |
generators |
|
http_utils | Module for fetching documents via HTTP |
json_utils | Collection of utilities for working with JSON |
matchingrules |
|
message | The |
message_pact | The |
v4 | V4 specification models |
xml_utils | Collection of utilities for working with XML |
Structs
PactConflict | Struct that defined an interaction conflict |
Request | Struct that defines the request. |
RequestResponseInteraction | Struct that defines an interaction (request and response pair) |
RequestResponsePact | Struct that represents a pact between the consumer and provider of a service. |
Response | Struct that defines the response. |
Constants
PACT_RUST_VERSION | Version of the library |
Traits
HttpPart | Trait to specify an HTTP part of a message. It encapsulates the shared parts of a request and response. |
Interaction | Interaction Trait |
Pact | Trait for a Pact (request/response or message) |
ReadWritePact | Trait for objects that can represent Pacts and can be read and written |
Functions
build_query_string | Converts a query string map into a query string |
http_interaction_from_json | Converts the JSON struct into an HTTP Interaction |
load_pact_from_json | Loads a Pact model from a JSON Value |
load_pact_from_url | Reads the pact file from a URL and parses the resulting JSON into a |
message_interaction_from_json | Converts the JSON struct into a Message Interaction |
parse_query_string | Parses a query string into an optional map. The query parameter name will be mapped to a list of values. Where the query parameter is repeated, the order of the values will be preserved. |
read_pact | Reads the pact file and parses the resulting JSON into a |
read_pact_from_file | Reads the pact from the file and parses the resulting JSON into a |
write_pact | Writes the pact out to the provided path. If there is an existing pact at the path, the two pacts will be merged together unless overwrite is true. Returns an error if the file can not be written or the pacts can not be merged. |