pub struct ExpectationAction {
pub http_request: Option<HttpRequest>,
pub http_class_callback: Option<HttpClassCallback>,
pub http_object_callback: Option<HttpObjectCallback>,
pub delay: Option<Delay>,
pub blocking: Option<bool>,
pub timeout: Option<Delay>,
pub failure_policy: Option<String>,
pub extra: Extra,
}Expand description
A side-effect action run before (beforeActions) or after (afterActions)
an expectation’s main action fires: an out-of-band request, or a class/object
callback.
Fields§
§http_request: Option<HttpRequest>§http_class_callback: Option<HttpClassCallback>§http_object_callback: Option<HttpObjectCallback>§delay: Option<Delay>§blocking: Option<bool>§timeout: Option<Delay>§failure_policy: Option<String>"FAIL_FAST" or "BEST_EFFORT".
extra: ExtraImplementations§
Source§impl ExpectationAction
impl ExpectationAction
Sourcepub fn request(request: HttpRequest) -> Self
pub fn request(request: HttpRequest) -> Self
Create a before/after action that fires an out-of-band HTTP request.
Sourcepub fn class_callback(callback: HttpClassCallback) -> Self
pub fn class_callback(callback: HttpClassCallback) -> Self
Create a before/after action that invokes a server-side class callback.
Trait Implementations§
Source§impl Clone for ExpectationAction
impl Clone for ExpectationAction
Source§fn clone(&self) -> ExpectationAction
fn clone(&self) -> ExpectationAction
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 ExpectationAction
impl Debug for ExpectationAction
Source§impl Default for ExpectationAction
impl Default for ExpectationAction
Source§fn default() -> ExpectationAction
fn default() -> ExpectationAction
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for ExpectationAction
impl<'de> Deserialize<'de> for ExpectationAction
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 ExpectationAction
impl PartialEq for ExpectationAction
Source§fn eq(&self, other: &ExpectationAction) -> bool
fn eq(&self, other: &ExpectationAction) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for ExpectationAction
impl Serialize for ExpectationAction
impl StructuralPartialEq for ExpectationAction
Auto Trait Implementations§
impl Freeze for ExpectationAction
impl RefUnwindSafe for ExpectationAction
impl Send for ExpectationAction
impl Sync for ExpectationAction
impl Unpin for ExpectationAction
impl UnsafeUnpin for ExpectationAction
impl UnwindSafe for ExpectationAction
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