Struct cosworth::prelude::server::ServiceConfig
source · pub struct ServiceConfig<H>(_);
Expand description
Http service configuration
Implementations§
source§impl<H> ServiceConfig<H>
impl<H> ServiceConfig<H>
sourcepub fn build(handler: H) -> ServiceConfigBuilder<H>
pub fn build(handler: H) -> ServiceConfigBuilder<H>
Create worker settings builder.
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
source§impl<H> ServiceConfig<H>where
H: 'static,
impl<H> ServiceConfig<H>where
H: 'static,
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_shutdown_timer(&self) -> Option<Instant>
pub fn client_shutdown_timer(&self) -> Option<Instant>
Client shutdown 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<H> Clone for ServiceConfig<H>
impl<H> Clone for ServiceConfig<H>
source§fn clone(&self) -> ServiceConfig<H>
fn clone(&self) -> ServiceConfig<H>
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 moreAuto Trait Implementations§
impl<H> !RefUnwindSafe for ServiceConfig<H>
impl<H> !Send for ServiceConfig<H>
impl<H> !Sync for ServiceConfig<H>
impl<H> Unpin for ServiceConfig<H>
impl<H> !UnwindSafe for ServiceConfig<H>
Blanket Implementations§
source§impl<T> IntoSql for T
impl<T> IntoSql for T
source§fn into_sql<T>(self) -> Self::Expressionwhere
Self: AsExpression<T> + Sized,
fn into_sql<T>(self) -> Self::Expressionwhere
Self: AsExpression<T> + Sized,
Convert
self
to an expression for Diesel’s query builder. Read moresource§fn as_sql<'a, T>(&'a self) -> <&'a Self as AsExpression<T>>::Expressionwhere
&'a Self: AsExpression<T>,
fn as_sql<'a, T>(&'a self) -> <&'a Self as AsExpression<T>>::Expressionwhere
&'a Self: AsExpression<T>,
Convert
&self
to an expression for Diesel’s query builder. Read more