Struct axum_test::TestServerConfig
source · pub struct TestServerConfig {
pub default_content_type: Option<String>,
pub socket_address: Option<SocketAddr>,
pub save_cookies: bool,
}Expand description
The basic setup for the TestServer.
Fields§
§default_content_type: Option<String>Set the default content type for all requests created by the TestServer.
This overrides the default ‘best efforts’ approach of requests.
socket_address: Option<SocketAddr>Set the socket to use for the server.
Defaults to a random socket.
Set for the server to save cookies that are returned, for use in future requests.
This is useful for automatically saving session cookies (and similar) like a browser would do.
Defaults to false (being turned off).
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 moresource§impl Debug for TestServerConfig
impl Debug for TestServerConfig
Auto Trait Implementations§
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