pub struct MockExpectations { /* private fields */ }Expand description
Expectations set on a mock endpoint for batch-style assertion.
Use MockEndpointInner::expect_body and
MockEndpointInner::expect_header to populate expectations, then call
MockEndpointInner::assert_satisfied after exchanges have been received.
Implementations§
Source§impl MockExpectations
impl MockExpectations
Sourcepub fn push_header(&mut self, key: String, value: Value)
pub fn push_header(&mut self, key: String, value: Value)
Add an expected header key-value pair.
Sourcepub fn push_header_regex(&mut self, key: String, pattern: String)
pub fn push_header_regex(&mut self, key: String, pattern: String)
Add an expected header regex pattern.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for MockExpectations
impl !UnwindSafe for MockExpectations
impl Freeze for MockExpectations
impl Send for MockExpectations
impl Sync for MockExpectations
impl Unpin for MockExpectations
impl UnsafeUnpin for MockExpectations
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