Struct actix_http::ServiceConfig
source · pub struct ServiceConfig(_);Expand description
HTTP service configuration.
Implementations§
source§impl ServiceConfig
impl ServiceConfig
sourcepub fn new(
keep_alive: KeepAlive,
client_request_timeout: Duration,
client_disconnect_timeout: Duration,
secure: bool,
local_addr: Option<SocketAddr>
) -> ServiceConfig
pub fn new( keep_alive: KeepAlive, client_request_timeout: Duration, client_disconnect_timeout: Duration, secure: bool, local_addr: Option<SocketAddr> ) -> ServiceConfig
Create instance of ServiceConfig.
sourcepub fn local_addr(&self) -> Option<SocketAddr>
pub fn local_addr(&self) -> Option<SocketAddr>
Returns the local address that this server is bound to.
Returns None for connections via UDS (Unix Domain Socket).
sourcepub fn keep_alive(&self) -> KeepAlive
pub fn keep_alive(&self) -> KeepAlive
Connection keep-alive setting.
sourcepub fn keep_alive_deadline(&self) -> Option<Instant>
pub fn keep_alive_deadline(&self) -> Option<Instant>
Creates a time object representing the deadline for this connection’s keep-alive period, if enabled.
When KeepAlive::Os or KeepAlive::Disabled is set, this will return None.
sourcepub fn client_request_deadline(&self) -> Option<Instant>
pub fn client_request_deadline(&self) -> Option<Instant>
Creates a time object representing the deadline for the client to finish sending the head of its first request.
Returns None if this ServiceConfig was constructed with client_request_timeout: 0.
sourcepub fn client_disconnect_deadline(&self) -> Option<Instant>
pub fn client_disconnect_deadline(&self) -> Option<Instant>
Creates a time object representing the deadline for the client to disconnect.
Trait Implementations§
source§impl Clone for ServiceConfig
impl Clone for ServiceConfig
source§fn clone(&self) -> ServiceConfig
fn clone(&self) -> ServiceConfig
Returns a copy 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 more