pub struct TestServerConfig { /* private fields */ }Expand description
Test server configuration
Implementations§
Source§impl TestServerConfig
impl TestServerConfig
Sourcepub fn openssl(self, acceptor: SslAcceptor) -> Self
pub fn openssl(self, acceptor: SslAcceptor) -> Self
Start openssl server.
Sourcepub fn client_timeout(self, val: Seconds) -> Self
pub fn client_timeout(self, val: Seconds) -> Self
Set server client timeout in seconds for first request.
Sourcepub fn port(self, port: u16) -> Self
pub fn port(self, port: u16) -> Self
Set server port. By default, test server binds to a random port assigned by OS.
Sourcepub fn listener(self, listener: TcpListener) -> Self
pub fn listener(self, listener: TcpListener) -> Self
Use an already bound TCP listener for the test server.
When set, the configured port is ignored.
Sourcepub fn server_cfg(self, cfg: impl Into<SharedCfg>) -> Self
pub fn server_cfg(self, cfg: impl Into<SharedCfg>) -> Self
Use custom SharedCfg for test server.
Sourcepub fn client_cfg(self, cfg: impl Into<SharedCfg>) -> Self
pub fn client_cfg(self, cfg: impl Into<SharedCfg>) -> Self
Use custom SharedCfg for client.
Trait Implementations§
Source§impl Debug for TestServerConfig
impl Debug for TestServerConfig
Auto Trait Implementations§
impl !RefUnwindSafe for TestServerConfig
impl !UnwindSafe for TestServerConfig
impl Freeze for TestServerConfig
impl Send for TestServerConfig
impl Sync for TestServerConfig
impl Unpin for TestServerConfig
impl UnsafeUnpin 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