pub struct ForwardChainExpectation<'a> { /* private fields */ }Expand description
Fluent builder for creating an expectation via client.when(...).respond(...).
Implementations§
Source§impl<'a> ForwardChainExpectation<'a>
impl<'a> ForwardChainExpectation<'a>
Sourcepub fn time_to_live(self, ttl: TimeToLive) -> Self
pub fn time_to_live(self, ttl: TimeToLive) -> Self
Set the time-to-live for this expectation.
Sourcepub fn with_id(self, id: impl Into<String>) -> Self
pub fn with_id(self, id: impl Into<String>) -> Self
Set the expectation ID (for upsert semantics).
Sourcepub fn respond(self, response: HttpResponse) -> Result<Vec<Expectation>>
pub fn respond(self, response: HttpResponse) -> Result<Vec<Expectation>>
Complete the expectation with a response action.
Sourcepub fn forward(self, forward: HttpForward) -> Result<Vec<Expectation>>
pub fn forward(self, forward: HttpForward) -> Result<Vec<Expectation>>
Complete the expectation with a forward action.
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for ForwardChainExpectation<'a>
impl<'a> !UnwindSafe for ForwardChainExpectation<'a>
impl<'a> Freeze for ForwardChainExpectation<'a>
impl<'a> Send for ForwardChainExpectation<'a>
impl<'a> Sync for ForwardChainExpectation<'a>
impl<'a> Unpin for ForwardChainExpectation<'a>
impl<'a> UnsafeUnpin for ForwardChainExpectation<'a>
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