pub struct ServiceConfig(/* private fields */);
Expand description
Http service configuration
Implementations§
Source§impl 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.
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 funcitonality
Sourcepub fn client_timer(&self) -> Option<Delay>
pub fn client_timer(&self) -> Option<Delay>
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<Delay>
pub fn keep_alive_timer(&self) -> Option<Delay>
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§
Source§impl Clone for ServiceConfig
impl Clone for ServiceConfig
Auto Trait Implementations§
impl Freeze for ServiceConfig
impl !RefUnwindSafe for ServiceConfig
impl !Send for ServiceConfig
impl !Sync for ServiceConfig
impl Unpin for ServiceConfig
impl !UnwindSafe for ServiceConfig
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more