Struct actix_http::ServiceConfig
source · [−]pub struct ServiceConfig(_);
Expand description
Http service configuration
Implementations
sourceimpl ServiceConfig
impl ServiceConfig
sourcepub fn new(
keep_alive: KeepAlive,
client_timeout: u64,
client_disconnect: u64,
secure: bool,
local_addr: Option<SocketAddr>
) -> ServiceConfig
pub fn new(
keep_alive: KeepAlive,
client_timeout: u64,
client_disconnect: u64,
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) -> Option<Duration>
pub fn keep_alive(&self) -> Option<Duration>
Keep alive duration if configured.
sourcepub fn keep_alive_enabled(&self) -> bool
pub fn keep_alive_enabled(&self) -> bool
Return state of connection keep-alive functionality
sourcepub fn client_timer(&self) -> Option<Sleep>
pub fn client_timer(&self) -> Option<Sleep>
Client timeout for first request.
sourcepub fn client_timer_expire(&self) -> Option<Instant>
pub fn client_timer_expire(&self) -> Option<Instant>
Client timeout for first request.
sourcepub fn client_disconnect_timer(&self) -> Option<Instant>
pub fn client_disconnect_timer(&self) -> Option<Instant>
Client disconnect timer
sourcepub fn keep_alive_timer(&self) -> Option<Sleep>
pub fn keep_alive_timer(&self) -> Option<Sleep>
Return keep-alive timer delay is configured.
sourcepub fn keep_alive_expire(&self) -> Option<Instant>
pub fn keep_alive_expire(&self) -> Option<Instant>
Keep-alive expire time
Trait Implementations
sourceimpl Clone for ServiceConfig
impl Clone for ServiceConfig
Auto Trait Implementations
impl !RefUnwindSafe for ServiceConfig
impl !Send for ServiceConfig
impl !Sync for ServiceConfig
impl Unpin for ServiceConfig
impl !UnwindSafe for ServiceConfig
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more