pub struct ServerConfig {
pub host: String,
pub port: u16,
pub max_body_bytes: usize,
pub request_timeout_ms: u64,
pub tls: Option<TlsSection>,
}Expand description
The server configuration resolved at build time and carried by an App.
Populated from defaults, an optional Config, and the
builder’s DSL setters. Read it back from a built app with
App::config.
Fields§
§host: StringBind address host.
port: u16Bind port.
max_body_bytes: usizeMaximum accepted request body size in bytes; larger bodies get 413.
request_timeout_ms: u64Per-request timeout in milliseconds; 0 disables the timeout.
tls: Option<TlsSection>TLS settings, or None for plaintext HTTP.
Trait Implementations§
Source§impl Clone for ServerConfig
impl Clone for ServerConfig
Source§fn clone(&self) -> ServerConfig
fn clone(&self) -> ServerConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 ServerConfig
impl Debug for ServerConfig
Auto Trait Implementations§
impl Freeze for ServerConfig
impl RefUnwindSafe for ServerConfig
impl Send for ServerConfig
impl Sync for ServerConfig
impl Unpin for ServerConfig
impl UnsafeUnpin for ServerConfig
impl UnwindSafe for ServerConfig
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