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

The message module provides all functionality to deal with messages.

The message_pact module defines a Pact that contains Messages instead of Interactions.

V4 specification models

Structs

Struct that defined an interaction conflict

Struct that defines an interaction (request and response pair)

Struct that represents a pact between the consumer and provider of a service.

Constants

Version of the library

Traits

Interaction Trait

Trait for a Pact (request/response or message)

Trait for objects that can represent Pacts and can be read and written

Functions

Determines the Pact specification version from the metadata of the Pact file

Converts the JSON struct into an HTTP Interaction

Loads a Pact model from a JSON Value

Reads the pact file from a URL and parses the resulting JSON into a Pact struct

Converts the JSON struct into a Message Interaction

Construct Metadata from JSON value

Reads the pact file and parses the resulting JSON into a Pact struct

Reads the pact from the file and parses the resulting JSON into a Pact struct

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.