Struct pact_models::v4::async_message::AsynchronousMessage [−][src]
pub struct AsynchronousMessage {
pub id: Option<String>,
pub key: Option<String>,
pub description: String,
pub provider_states: Vec<ProviderState>,
pub contents: MessageContents,
pub comments: HashMap<String, Value>,
pub pending: bool,
pub plugin_config: HashMap<String, HashMap<String, Value>>,
pub interaction_markup: InteractionMarkup,
}
Expand description
Asynchronous interactions as a sequence of messages
Fields
id: Option<String>
Interaction ID. This will only be set if the Pact file was fetched from a Pact Broker
key: Option<String>
Unique key for this interaction
description: String
A description for the interaction. Must be unique within the Pact file
provider_states: Vec<ProviderState>
Optional provider state for the interaction. See https://docs.pact.io/getting_started/provider_states for more info on provider states.
contents: MessageContents
The contents of the message
comments: HashMap<String, Value>
Annotations and comments associated with this interaction
pending: bool
If this interaction is pending. Pending interactions will never fail the build if they fail
plugin_config: HashMap<String, HashMap<String, Value>>
Configuration added by plugins
interaction_markup: InteractionMarkup
Text markup to use to render the interaction in a UI
Implementations
Creates a new version with a calculated key
Returns the content type of the message by returning the content type associated with the body, or by looking it up in the message metadata
Trait Implementations
Returns the headers of the HTTP part.
Returns the headers of the HTTP part in a mutable form.
Returns the body of the HTTP part.
Returns the matching rules of the HTTP part.
Returns the generators of the HTTP part.
Lookup up the content type for the part
Tries to detect the content type of the body by matching some regular expressions against the first 32 characters. Read more
Determine the content type of the HTTP part. If a Content-Type
header is present, the
value of that header will be returned. Otherwise, the body will be inspected. Read more
Checks if the HTTP Part has the given header
Checks if the HTTP Part has the given header
If the body is a textual type (non-binary)
Convenience method to add a header
Builds a map of generators from the generators and matching rules
If this is a request/response interaction
Returns the request/response interaction if it is one
If this is a message interaction
Returns the message interaction if it is one
Interaction ID. This will only be set if the Pact file was fetched from a Pact Broker
Description of this interaction. This needs to be unique in the pact file.
Optional provider states for the interaction.
See <https://docs.pact.io/getting_started/provider_states>
for more info on provider states. Read more
Some interactions have multiple contents (like request/response), so it is impossible to know which to return for this method
Body of the response or message
The contents of the part to use for verification. For example, with HTTP interactions, this will be the response body Read more
Some interactions have multiple contents (like request/response), so it is impossible to know which to return for this method
Determine the content type of the interaction. If a Content-Type
header or metadata value is present, the
value of that value will be returned. Otherwise, the contents will be inspected. Read more
Returns the interaction in V4 format
Returns the interaction in V4 format
Returns the interaction in V4 format
Returns the interaction in V4 format
Clones this interaction and wraps it in a Box
Clones this interaction and wraps it in an Arc
Clones this interaction and wraps it in an Arc and Mutex
Returns the matching rules associated with this interaction (if there are any)
Convert the interaction to its super trait
Clones this interaction and wraps it in a box
Annotations and comments associated with this interaction
Mutable access to the annotations and comments associated with this interaction
Type of this V4 interaction
Any configuration added to the interaction from a plugin
Markup added to the interaction to render in UIs
Auto Trait Implementations
impl RefUnwindSafe for AsynchronousMessage
impl Send for AsynchronousMessage
impl Sync for AsynchronousMessage
impl Unpin for AsynchronousMessage
impl UnwindSafe for AsynchronousMessage
Blanket Implementations
Mutably borrows from an owned value. Read more
Compare self to key
and return true
if they are equal.
pub fn vzip(self) -> V
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