Struct pact_models::Consumer[][src]

pub struct Consumer {
    pub name: String,
}

Struct that defines the consumer of the pact.

Fields

name: String

Each consumer should have a unique name to identify it.

Implementations

impl Consumer[src]

pub fn from_json(pact_json: &Value) -> Consumer[src]

Builds a Consumer from the Json struct.

pub fn to_json(&self) -> Value[src]

Converts this Consumer to a Value struct.

Trait Implementations

impl Clone for Consumer[src]

impl Debug for Consumer[src]

impl Default for Consumer[src]

impl<'de> Deserialize<'de> for Consumer[src]

impl PartialEq<Consumer> for Consumer[src]

impl Serialize for Consumer[src]

impl StructuralPartialEq for Consumer[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.