[−][src]Struct pact_matching::models::Response
Struct that defines the response.
Fields
status: u16
Response status
headers: Option<HashMap<String, Vec<String>>>
Response headers
body: OptionalBody
Response body
matching_rules: MatchingRules
Response matching rules
generators: Generators
Response generators
Implementations
impl Response
[src]
pub fn from_json(response: &Value, _: &PactSpecification) -> Response
[src]
Build a Response
from a Value
struct.
pub fn default_response() -> Response
[src]
👎 Deprecated since 0.5.4:
please use default()
from the standard Default trait instead
Returns a default response: Status 200
pub fn to_json(&self, spec_version: &PactSpecification) -> Value
[src]
Converts this response to a Value
struct.
pub fn differences_from(
&self,
other: &Response
) -> Vec<(DifferenceType, String)>
[src]
&self,
other: &Response
) -> Vec<(DifferenceType, String)>
Return a description of all the differences from the other response
Trait Implementations
impl Clone for Response
[src]
impl Debug for Response
[src]
impl Default for Response
[src]
impl Display for Response
[src]
impl Eq for Response
[src]
impl Hash for Response
[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 HttpPart for Response
[src]
fn headers(&self) -> &Option<HashMap<String, Vec<String>>>
[src]
fn body(&self) -> &OptionalBody
[src]
fn matching_rules(&self) -> &MatchingRules
[src]
fn generators(&self) -> &Generators
[src]
fn content_type(&self) -> String
[src]
fn detect_content_type(&self) -> String
[src]
fn content_type_enum(&self) -> DetectedContentType
[src]
fn has_header(&self, header_name: &String) -> bool
[src]
fn lookup_header_value(&self, header_name: &String) -> Option<String>
[src]
fn has_text_body(&self) -> bool
[src]
impl PartialEq<Response> for Response
[src]
impl StructuralEq for Response
[src]
Auto Trait Implementations
impl RefUnwindSafe for Response
impl Send for Response
impl Sync for Response
impl Unpin for Response
impl UnwindSafe for Response
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>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Typeable for T where
T: Any,
T: Any,