Struct mockito::ServerOpts
source · pub struct ServerOpts {
pub host: &'static str,
pub port: u16,
pub assert_on_drop: bool,
}
Expand description
Options to configure a mock server. Provides a default implementation.
let opts = mockito::ServerOpts { port: 1234, ..Default::default() };
Fields§
§host: &'static str
The server host (defaults to 127.0.0.1)
port: u16
The server port (defaults to a randomly assigned free port)
assert_on_drop: bool
Automatically call assert()
before dropping a mock (defaults to false)
Trait Implementations§
Auto Trait Implementations§
impl RefUnwindSafe for ServerOpts
impl Send for ServerOpts
impl Sync for ServerOpts
impl Unpin for ServerOpts
impl UnwindSafe for ServerOpts
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