pub struct ActixSettings {
pub hosts: Vec<Address>,
pub mode: Mode,
pub enable_compression: bool,
pub enable_log: bool,
pub num_workers: NumWorkers,
pub backlog: Backlog,
pub max_connections: MaxConnections,
pub max_connection_rate: MaxConnectionRate,
pub keep_alive: KeepAlive,
pub client_timeout: Timeout,
pub client_shutdown: Timeout,
pub shutdown_timeout: Timeout,
}Expand description
Settings types for Actix Web.
Fields§
§hosts: Vec<Address>List of addresses for the server to bind to.
mode: ModeMarker of intended deployment environment.
enable_compression: boolTrue if the Compress middleware should be enabled.
enable_log: boolTrue if the Logger middleware should be enabled.
num_workers: NumWorkersThe number of workers that the server should start.
backlog: BacklogThe maximum number of pending connections.
max_connections: MaxConnectionsThe per-worker maximum number of concurrent connections.
max_connection_rate: MaxConnectionRateThe per-worker maximum concurrent TLS connection limit.
keep_alive: KeepAliveServer keep-alive preference.
client_timeout: TimeoutTimeout duration for reading client request header.
client_shutdown: TimeoutTimeout duration for connection shutdown.
shutdown_timeout: TimeoutTimeout duration for graceful worker shutdown.
Trait Implementations§
Source§impl<F, I, S, B> ApplySettings<ActixSettings> for HttpServer<F, I, S, B>
impl<F, I, S, B> ApplySettings<ActixSettings> for HttpServer<F, I, S, B>
Source§fn apply_settings(self, settings: &ActixSettings) -> Self
fn apply_settings(self, settings: &ActixSettings) -> Self
👎Deprecated: Prefer
try_apply_settings().Applies some settings object value to
self. Read moreSource§fn try_apply_settings(self, settings: &ActixSettings) -> Result<Self, Error>
fn try_apply_settings(self, settings: &ActixSettings) -> Result<Self, Error>
Applies some settings object value to
self. Read moreSource§impl Clone for ActixSettings
impl Clone for ActixSettings
Source§fn clone(&self) -> ActixSettings
fn clone(&self) -> ActixSettings
Returns a duplicate 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 ActixSettings
impl Debug for ActixSettings
Source§impl<'de> Deserialize<'de> for ActixSettings
impl<'de> Deserialize<'de> for ActixSettings
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
Source§impl Hash for ActixSettings
impl Hash for ActixSettings
Source§impl PartialEq for ActixSettings
impl PartialEq for ActixSettings
impl Eq for ActixSettings
impl StructuralPartialEq for ActixSettings
Auto Trait Implementations§
impl Freeze for ActixSettings
impl RefUnwindSafe for ActixSettings
impl Send for ActixSettings
impl Sync for ActixSettings
impl Unpin for ActixSettings
impl UnwindSafe for ActixSettings
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