pub struct ExpectationStep {Show 13 fields
pub http_request: Option<HttpRequest>,
pub http_class_callback: Option<HttpClassCallback>,
pub http_object_callback: Option<HttpObjectCallback>,
pub http_forward: Option<HttpForward>,
pub http_override_forwarded_request: Option<HttpOverrideForwardedRequest>,
pub http_response: Option<HttpResponse>,
pub http_error: Option<HttpError>,
pub responder: Option<bool>,
pub delay: Option<Delay>,
pub blocking: Option<bool>,
pub timeout: Option<Delay>,
pub failure_policy: Option<String>,
pub extra: Extra,
}Expand description
One step of a multi-step expectation (steps) — used to script a sequence of
responder/side-effect actions for a single match.
Fields§
§http_request: Option<HttpRequest>§http_class_callback: Option<HttpClassCallback>§http_object_callback: Option<HttpObjectCallback>§http_forward: Option<HttpForward>§http_override_forwarded_request: Option<HttpOverrideForwardedRequest>§http_response: Option<HttpResponse>§http_error: Option<HttpError>§responder: Option<bool>§delay: Option<Delay>§blocking: Option<bool>§timeout: Option<Delay>§failure_policy: Option<String>"FAIL_FAST" or "BEST_EFFORT".
extra: ExtraImplementations§
Source§impl ExpectationStep
impl ExpectationStep
Sourcepub fn response(response: HttpResponse) -> Self
pub fn response(response: HttpResponse) -> Self
Create a step whose responder action is the given response.
Trait Implementations§
Source§impl Clone for ExpectationStep
impl Clone for ExpectationStep
Source§fn clone(&self) -> ExpectationStep
fn clone(&self) -> ExpectationStep
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 ExpectationStep
impl Debug for ExpectationStep
Source§impl Default for ExpectationStep
impl Default for ExpectationStep
Source§fn default() -> ExpectationStep
fn default() -> ExpectationStep
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for ExpectationStep
impl<'de> Deserialize<'de> for ExpectationStep
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
Source§impl PartialEq for ExpectationStep
impl PartialEq for ExpectationStep
Source§fn eq(&self, other: &ExpectationStep) -> bool
fn eq(&self, other: &ExpectationStep) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for ExpectationStep
impl Serialize for ExpectationStep
impl StructuralPartialEq for ExpectationStep
Auto Trait Implementations§
impl Freeze for ExpectationStep
impl RefUnwindSafe for ExpectationStep
impl Send for ExpectationStep
impl Sync for ExpectationStep
impl Unpin for ExpectationStep
impl UnsafeUnpin for ExpectationStep
impl UnwindSafe for ExpectationStep
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