[−][src]Struct pact_matching::models::Interaction
Struct that defines an interaction (request and response pair)
Fields
id: Option<String>
Interaction ID. This will only be set if the Pact file was fetched from a Pact Broker
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 https://docs.pact.io/getting_started/provider_states for more info on provider states.
request: Request
Request of the interaction
response: Response
Response of the interaction
Methods
impl Interaction
[src]
pub fn from_json(
index: usize,
pact_json: &Value,
spec_version: &PactSpecification
) -> Interaction
[src]
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]
Converts this interaction to a Value
struct.
pub fn conflicts_with(&self, other: &Interaction) -> Vec<PactConflict>
[src]
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
Trait Implementations
impl Clone for Interaction
[src]
fn clone(&self) -> Interaction
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for Interaction
[src]
impl Default for Interaction
[src]
impl Display for Interaction
[src]
impl Eq for Interaction
[src]
impl Hash for Interaction
[src]
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl PartialEq<Interaction> for Interaction
[src]
fn eq(&self, other: &Interaction) -> bool
[src]
fn ne(&self, other: &Interaction) -> bool
[src]
impl StructuralEq for Interaction
[src]
impl StructuralPartialEq for Interaction
[src]
Auto Trait Implementations
impl RefUnwindSafe for Interaction
impl Send for Interaction
impl Sync for Interaction
impl Unpin for Interaction
impl UnwindSafe for Interaction
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<Q, K> Equivalent<K> for Q where
K: Borrow<Q> + ?Sized,
Q: Eq + ?Sized,
[src]
K: Borrow<Q> + ?Sized,
Q: Eq + ?Sized,
fn equivalent(&self, key: &K) -> bool
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,