pub struct ServerSection {
pub host: String,
pub port: u16,
pub max_body_bytes: usize,
pub request_timeout_ms: u64,
}Expand description
The [server] configuration table.
Every field has a default (see ServerSection::default), so a partial
[server] table is valid.
Fields§
§host: StringBind address host (default "127.0.0.1").
port: u16Bind port (default 8080).
max_body_bytes: usizeMaximum accepted request body size in bytes (default 1 MiB). Larger
bodies are rejected with 413 Payload Too Large.
request_timeout_ms: u64Per-request timeout in milliseconds (default 30000). 0 disables the
timeout.
Trait Implementations§
Source§impl Clone for ServerSection
impl Clone for ServerSection
Source§fn clone(&self) -> ServerSection
fn clone(&self) -> ServerSection
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 ServerSection
impl Debug for ServerSection
Source§impl Default for ServerSection
impl Default for ServerSection
Source§impl<'de> Deserialize<'de> for ServerSectionwhere
ServerSection: Default,
impl<'de> Deserialize<'de> for ServerSectionwhere
ServerSection: Default,
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for ServerSection
impl RefUnwindSafe for ServerSection
impl Send for ServerSection
impl Sync for ServerSection
impl Unpin for ServerSection
impl UnsafeUnpin for ServerSection
impl UnwindSafe for ServerSection
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