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_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
sourceimpl Clone for ServiceConfig
impl Clone for ServiceConfig
sourcefn clone(&self) -> ServiceConfig
fn clone(&self) -> ServiceConfig
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for ServiceConfig
impl Debug 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 · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more