pub struct HttpConfig {
pub request_timeout_secs: u64,
pub keep_alive_timeout_secs: u64,
pub max_request_size: usize,
pub enable_tracing: bool,
pub health_check_path: String,
pub shutdown_timeout_secs: u64,
}Expand description
HTTP server specific configuration
Fields§
§request_timeout_secs: u64Request timeout in seconds
keep_alive_timeout_secs: u64Keep alive timeout in seconds
max_request_size: usizeMaximum request body size in bytes
enable_tracing: boolEnable request tracing
health_check_path: StringHealth check endpoint path
shutdown_timeout_secs: u64Server shutdown timeout in seconds
Implementations§
Source§impl HttpConfig
impl HttpConfig
Sourcepub fn request_timeout(&self) -> Duration
pub fn request_timeout(&self) -> Duration
Get request timeout as Duration
Sourcepub fn keep_alive_timeout(&self) -> Duration
pub fn keep_alive_timeout(&self) -> Duration
Get keep-alive timeout as Duration
Sourcepub fn shutdown_timeout(&self) -> Duration
pub fn shutdown_timeout(&self) -> Duration
Get shutdown timeout as Duration
Trait Implementations§
Source§impl AppConfigTrait for HttpConfig
impl AppConfigTrait for HttpConfig
Source§fn from_env() -> Result<Self, ConfigError>
fn from_env() -> Result<Self, ConfigError>
Load configuration from environment variables
Source§fn config_sources(&self) -> HashMap<String, ConfigSource>
fn config_sources(&self) -> HashMap<String, ConfigSource>
Get configuration source information for debugging
Source§impl Clone for HttpConfig
impl Clone for HttpConfig
Source§fn clone(&self) -> HttpConfig
fn clone(&self) -> HttpConfig
Returns a duplicate 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 moreSource§impl Debug for HttpConfig
impl Debug for HttpConfig
Source§impl Default for HttpConfig
impl Default for HttpConfig
Source§impl<'de> Deserialize<'de> for HttpConfig
impl<'de> Deserialize<'de> for HttpConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for HttpConfig
impl RefUnwindSafe for HttpConfig
impl Send for HttpConfig
impl Sync for HttpConfig
impl Unpin for HttpConfig
impl UnwindSafe for HttpConfig
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> 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