pub struct TestServerConfig { /* private fields */ }
Implementations§
Source§impl TestServerConfig
impl TestServerConfig
Sourcepub fn client_request_timeout(self, dur: Duration) -> Self
pub fn client_request_timeout(self, dur: Duration) -> Self
Sets client timeout for first request.
Sourcepub fn listen_address(self, addr: impl Into<String>) -> Self
pub fn listen_address(self, addr: impl Into<String>) -> Self
Sets the address the server will listen on.
By default, only listens on 127.0.0.1
.
Sourcepub fn port(self, port: u16) -> Self
pub fn port(self, port: u16) -> Self
Sets test server port.
By default, a random free port is determined by the OS.
Sourcepub fn workers(self, workers: usize) -> Self
pub fn workers(self, workers: usize) -> Self
Sets number of workers for the test server.
By default, the server uses 1 worker
Sourcepub fn disable_redirects(self) -> Self
pub fn disable_redirects(self) -> Self
Instruct the client to not follow redirects.
By default, the client will follow up to 10 consecutive redirects before giving up.
Trait Implementations§
Source§impl Clone for TestServerConfig
impl Clone for TestServerConfig
Source§fn clone(&self) -> TestServerConfig
fn clone(&self) -> TestServerConfig
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl Freeze for TestServerConfig
impl RefUnwindSafe for TestServerConfig
impl Send for TestServerConfig
impl Sync for TestServerConfig
impl Unpin for TestServerConfig
impl UnwindSafe for TestServerConfig
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