Struct pact_models::v4::synch_http::SynchronousHttp [−][src]
pub struct SynchronousHttp {
pub id: Option<String>,
pub key: Option<String>,
pub description: String,
pub provider_states: Vec<ProviderState>,
pub request: HttpRequest,
pub response: HttpResponse,
pub comments: HashMap<String, Value>,
pub pending: bool,
pub plugin_config: HashMap<String, HashMap<String, Value>>,
pub interaction_markup: InteractionMarkup,
}
Expand description
V4 HTTP Interaction Type
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 states for the interaction.
See <https://docs.pact.io/getting_started/provider_states>
for more info on provider states.
request: HttpRequest
Request of the interaction
response: HttpResponse
Response of the interaction
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
Trait Implementations
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.
Set the description of this interaction. This needs to be unique in the pact file.
fn provider_states(&self) -> Vec<ProviderState>ⓘ
fn provider_states(&self) -> Vec<ProviderState>ⓘ
Optional provider states for the interaction.
See <https://docs.pact.io/getting_started/provider_states>
for more info on provider states. Read more
fn provider_states_mut(&mut self) -> &mut Vec<ProviderState>ⓘ
fn provider_states_mut(&mut self) -> &mut Vec<ProviderState>ⓘ
Mutable 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 a mutable reference for the interaction. If the interaction is not a V4 format,
will return None. The as_v4
method can convert to V4 format (via cloning the data). Read more
If the interaction is V4 HTTP
Returns the interaction in V4 format
Returns the interaction in V4 format
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
Some interactions have multiple contents (like request/response), so it is impossible to know which to return for this method
Returns the matching rules associated with this interaction (if there are any)
If the interaction is a V4 message
If the interaction is a V4 synchronous request/response message
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
Any configuration added to the interaction from a plugin
Markup added to the interaction to render in UIs
Markup added to the interaction to render in UIs
Auto Trait Implementations
impl RefUnwindSafe for SynchronousHttp
impl Send for SynchronousHttp
impl Sync for SynchronousHttp
impl Unpin for SynchronousHttp
impl UnwindSafe for SynchronousHttp
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