Struct pact_matching::models::Interaction [−][src]
pub struct Interaction { pub description: String, pub provider_states: Vec<ProviderState>, pub request: Request, pub response: Response, }
Struct that defines an interaction (request and response pair)
Fields
description: String
Description of this interaction. This needs to be unique in the pact file.
provider_states: Vec<ProviderState>
Optional provider states for the interaction. See http://docs.pact.io/documentation/provider_states.html for more info on provider states.
request: Request
Request of the interaction
response: Response
Response of the interaction
Methods
impl Interaction
[src]
impl Interaction
pub fn from_json(
index: usize,
pact_json: &Value,
spec_version: &PactSpecification
) -> Interaction
[src]
pub fn from_json(
index: usize,
pact_json: &Value,
spec_version: &PactSpecification
) -> Interaction
Constructs an Interaction
from the Value
struct.
pub fn to_json(&self, spec_version: &PactSpecification) -> Value
[src]
pub fn to_json(&self, spec_version: &PactSpecification) -> Value
Converts this interaction to a Value
struct.
pub fn conflicts_with(&self, other: &Interaction) -> Vec<PactConflict>
[src]
pub fn conflicts_with(&self, other: &Interaction) -> Vec<PactConflict>
Returns list of conflicts if this interaction conflicts with the other interaction.
Two interactions conflict if they have the same description and provider state, but they request and responses are not equal
pub fn default() -> Interaction
[src]
pub fn default() -> Interaction
Creates a default interaction
Trait Implementations
impl Debug for Interaction
[src]
impl Debug for Interaction
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl Clone for Interaction
[src]
impl Clone for Interaction
fn clone(&self) -> Interaction
[src]
fn clone(&self) -> Interaction
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
impl PartialEq for Interaction
[src]
impl PartialEq for Interaction
fn eq(&self, other: &Interaction) -> bool
[src]
fn eq(&self, other: &Interaction) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Interaction) -> bool
[src]
fn ne(&self, other: &Interaction) -> bool
This method tests for !=
.
impl Eq for Interaction
[src]
impl Eq for Interaction
impl Hash for Interaction
[src]
impl Hash for Interaction
Auto Trait Implementations
impl Send for Interaction
impl Send for Interaction
impl Sync for Interaction
impl Sync for Interaction