Expand description
The pact_models
crate provides all the structs and traits required to model a Pact.
§Crate features
All features are enabled by default
datetime
: Enables support of date and time expressions and generators. This will add thechronos
crate as a dependency.xml
: Enables support for parsing XML documents. This feature will add thesxd-document
crate as a dependency.
Modules§
- bodies
- Module for handling interaction content (bodies)
- content_
types - Module for handling content types
- expression_
parser - expression parser for generator expressions
- file_
utils - Functions for dealing with file locks while reading/writing pact files
- generators
generators
module includes all the classes to deal with V3/V4 spec generators- headers
- http_
parts - HTTP parts of a Request/Response interaction
- http_
utils - Module for fetching documents via HTTP
- interaction
- Models for Pact interactions
- json_
utils - Collection of utilities for working with JSON
- matchingrules
matchingrules
module includes all the classes to deal with V3/V4 spec matchers- message
- The
message
module provides all functionality to deal with message interactions. - message_
pact - The
message_pact
module defines a Pact that contains Messages instead of Interactions. - pact
- Traits to represent a Pact
- path_
exp - Functions for dealing with path expressions
- plugins
- Models to support plugins
- prelude
- A “prelude” or a default list of import types to include.
- provider_
states provider_states
module contains all the logic for dealing with provider states. Seehttps://docs.pact.io/getting_started/provider_states
for more info on provider states.- query_
strings - request
- Structs to model an HTTP request
- response
- sync_
interaction - Models for synchronous request/response interactions
- sync_
pact - Synchronous HTTP Request/Response Pact
- time_
utils - Utilities for dealing with time and date values. These are based on the Java DateTimeFormatter
- v4
- V4 specification models
- verify_
json - Module for verifying the state of the Pact JSON (file format verification)
- xml_
utils - Collection of utilities for working with XML
Macros§
- generators
- Macro to make constructing generators easy Example usage:
- matchingrules
- Macro to ease constructing matching rules Example usage:
- matchingrules_
list - Macro to ease constructing matching rules Example usage:
Structs§
- Consumer
- Struct that defines the consumer of the pact.
- Provider
- Struct that defines a provider of a pact.
Enums§
- Difference
Type - Enumeration of the types of differences between requests and responses
- Http
Status - Enum that defines the different types of HTTP statuses
- Pact
Specification - Enum defining the pact specification versions supported by the library
Constants§
- PACT_
RUST_ VERSION - Version of the library