pub enum MockBehavior {
PassThrough,
ReturnResponse(u16, String),
AddHeader(String, String),
Delay(Duration),
Error(String),
}
Variants§
PassThrough
Pass through to next middleware
ReturnResponse(u16, String)
Return a specific response (short-circuit)
AddHeader(String, String)
Add a header and continue
Delay(Duration)
Delay execution
Error(String)
Simulate an error
Trait Implementations§
Source§impl Clone for MockBehavior
impl Clone for MockBehavior
Source§fn clone(&self) -> MockBehavior
fn clone(&self) -> MockBehavior
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 moreAuto Trait Implementations§
impl Freeze for MockBehavior
impl RefUnwindSafe for MockBehavior
impl Send for MockBehavior
impl Sync for MockBehavior
impl Unpin for MockBehavior
impl UnwindSafe for MockBehavior
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