pub struct StubBuilder { /* private fields */ }Expand description
Builder for creating response stubs
Implementations§
Source§impl StubBuilder
impl StubBuilder
Sourcepub fn new(method: impl Into<String>, path: impl Into<String>) -> Self
pub fn new(method: impl Into<String>, path: impl Into<String>) -> Self
Create a new stub builder
Sourcepub fn header(self, key: impl Into<String>, value: impl Into<String>) -> Self
pub fn header(self, key: impl Into<String>, value: impl Into<String>) -> Self
Add a response header
Sourcepub fn state_machine(self, config: StateMachineConfig) -> Self
pub fn state_machine(self, config: StateMachineConfig) -> Self
Set state machine configuration
Sourcepub fn fault_injection(self, config: StubFaultInjectionConfig) -> Self
pub fn fault_injection(self, config: StubFaultInjectionConfig) -> Self
Set fault injection configuration
Sourcepub fn build(self) -> ResponseStub
pub fn build(self) -> ResponseStub
Build the response stub
Auto Trait Implementations§
impl Freeze for StubBuilder
impl RefUnwindSafe for StubBuilder
impl Send for StubBuilder
impl Sync for StubBuilder
impl Unpin for StubBuilder
impl UnwindSafe for StubBuilder
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