actix_settings/settings/
mod.rs1use serde::Deserialize;
2
3mod address;
4mod backlog;
5mod keep_alive;
6mod max_connection_rate;
7mod max_connections;
8mod mode;
9mod num_workers;
10mod timeout;
11#[cfg(feature = "openssl")]
12mod tls;
13
14#[cfg(feature = "openssl")]
15pub use self::tls::Tls;
16pub use self::{
17 address::Address, backlog::Backlog, keep_alive::KeepAlive,
18 max_connection_rate::MaxConnectionRate, max_connections::MaxConnections, mode::Mode,
19 num_workers::NumWorkers, timeout::Timeout,
20};
21
22#[derive(Debug, Clone, PartialEq, Eq, Hash, Deserialize)]
24#[serde(rename_all = "kebab-case")]
25pub struct ActixSettings {
26 pub hosts: Vec<Address>,
28
29 pub mode: Mode,
31
32 pub enable_compression: bool,
34
35 pub enable_log: bool,
37
38 pub num_workers: NumWorkers,
40
41 pub backlog: Backlog,
43
44 pub max_connections: MaxConnections,
46
47 pub max_connection_rate: MaxConnectionRate,
49
50 pub keep_alive: KeepAlive,
52
53 pub client_timeout: Timeout,
55
56 pub client_shutdown: Timeout,
58
59 pub shutdown_timeout: Timeout,
61
62 #[cfg(feature = "openssl")]
64 pub tls: Tls,
65}