pub struct TestServerConfig {
pub read_timeout: Duration,
pub log_requests: bool,
}Expand description
Configuration for TestServer.
Fields§
§read_timeout: DurationTCP read timeout for connections (default: 5 seconds).
log_requests: boolWhether to log each request/response (default: true).
Implementations§
Source§impl TestServerConfig
impl TestServerConfig
Sourcepub fn read_timeout(self, timeout: Duration) -> Self
pub fn read_timeout(self, timeout: Duration) -> Self
Sets the read timeout for TCP connections.
Sourcepub fn log_requests(self, log: bool) -> Self
pub fn log_requests(self, log: bool) -> Self
Sets whether to log requests.
Trait Implementations§
Source§impl Clone for TestServerConfig
impl Clone for TestServerConfig
Source§fn clone(&self) -> TestServerConfig
fn clone(&self) -> TestServerConfig
Returns a duplicate 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 moreSource§impl Debug for TestServerConfig
impl Debug for TestServerConfig
Auto 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, _span: NoopSpan) -> Self
fn instrument(self, _span: NoopSpan) -> Self
Instruments this future with a span (no-op when disabled).
Source§fn in_current_span(self) -> Self
fn in_current_span(self) -> Self
Instruments this future with the current span (no-op when disabled).