pub struct HttpExpectedResponse {
pub status_code: u16,
pub body: Option<Value>,
pub body_partial: Option<Value>,
pub headers: HashMap<String, String>,
pub validation_errors: Option<Vec<ValidationErrorExpectation>>,
}Expand description
Expected HTTP response specification.
Fields§
§status_code: u16§body: Option<Value>Exact body match.
body_partial: Option<Value>Partial body match (only check specified fields).
headers: HashMap<String, String>Header expectations. Special tokens: <<uuid>>, <<present>>, <<absent>>.
validation_errors: Option<Vec<ValidationErrorExpectation>>Expected validation errors (for 422 responses).
Trait Implementations§
Source§impl Clone for HttpExpectedResponse
impl Clone for HttpExpectedResponse
Source§fn clone(&self) -> HttpExpectedResponse
fn clone(&self) -> HttpExpectedResponse
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for HttpExpectedResponse
impl Debug for HttpExpectedResponse
Source§impl<'de> Deserialize<'de> for HttpExpectedResponse
impl<'de> Deserialize<'de> for HttpExpectedResponse
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for HttpExpectedResponse
impl RefUnwindSafe for HttpExpectedResponse
impl Send for HttpExpectedResponse
impl Sync for HttpExpectedResponse
impl Unpin for HttpExpectedResponse
impl UnsafeUnpin for HttpExpectedResponse
impl UnwindSafe for HttpExpectedResponse
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more