pub struct MockConfigBuilder { /* private fields */ }Expand description
Builder for creating mock configurations
Implementations§
Source§impl MockConfigBuilder
impl MockConfigBuilder
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 mock configuration 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 single response header
Sourcepub fn latency_ms(self, ms: u64) -> Self
pub fn latency_ms(self, ms: u64) -> Self
Set the latency in milliseconds
Sourcepub fn build(self) -> MockConfig
pub fn build(self) -> MockConfig
Build the mock configuration
Auto Trait Implementations§
impl Freeze for MockConfigBuilder
impl RefUnwindSafe for MockConfigBuilder
impl Send for MockConfigBuilder
impl Sync for MockConfigBuilder
impl Unpin for MockConfigBuilder
impl UnwindSafe for MockConfigBuilder
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