pub struct Config {
pub port: u16,
pub key_dir: PathBuf,
pub max_line: usize,
pub max_connections: usize,
pub first_request: Duration,
pub reply_timeout: Duration,
}Expand description
Server settings. Config::new gives the hardened defaults.
Fields§
§port: u16TCP port on 127.0.0.1; 0 picks a free one (Server::port tells which).
key_dir: PathBufFolder for the key file (the app’s settings folder).
max_line: usizeLongest request line in bytes.
max_connections: usizeConnections served at once; further ones get an error line and are closed.
first_request: DurationA connection that sends no authorised request in this time is closed.
reply_timeout: DurationHow long a connection waits for the app thread to answer one request.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Forget for Config
impl Freeze for Config
impl Move for Config
impl RefUnwindSafe for Config
impl Send for Config
impl Sync for Config
impl Unpin for Config
impl UnsafeUnpin for Config
impl UnwindSafe for Config
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