Struct pact_models::v4::pact::V4Pact[][src]

pub struct V4Pact {
    pub consumer: Consumer,
    pub provider: Provider,
    pub interactions: Vec<Box<dyn V4Interaction>>,
    pub metadata: BTreeMap<String, Value>,
    pub plugin_data: Vec<PluginData>,
}
Expand description

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

Fields

consumer: Consumer

Consumer side of the pact

provider: Provider

Provider side of the pact

interactions: Vec<Box<dyn V4Interaction>>

List of messages between the consumer and provider.

metadata: BTreeMap<String, Value>

Metadata associated with this pact.

plugin_data: Vec<PluginData>

Plugin data associated with this pact

Implementations

If this Pact has any interactions of the given type

If this Pact has different types of interactions

Returns all the interactions of the given type

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Returns the “default value” for a type. Read more

Consumer side of the pact

Provider side of the pact

Interactions in the Pact

Pact metadata

Converts this pact to a Value struct.

Attempt to downcast to a concrete Pact

Attempt to downcast to a concrete Message Pact

Attempt to downcast to a concrete V4 Pact

Specification version of this Pact

Clones this Pact and wraps it in a Box

Clones this Pact and wraps it in an Arc

Clones this Pact and wraps it in an Arc and Mutex

Adds an interactions in the Pact

If this Pact needs any plugins loaded

Plugins required for this Pact. These will be taken from the ‘plugins’ key in the pact metadata. Read more

If this is a V4 Pact

Add the plugin and plugin data to this Pact. If an entry already exists for the plugin, the plugin data will be merged Read more

Adds some version info to the Pact-Rust metadata section

Verify the JSON format. Will return an error if the list contains any Error result

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

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

Merges this pact with the other pact, and returns a new Pact with the interactions sorted. Returns an error if there is a merge conflict, which will occur if the other pact is a different type, or if a V3 Pact then if any interaction has the same description and provider state and the requests and responses are different. Read more

Determines the default file name for the pact. This is based on the consumer and provider names. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more