pub struct HttpConfig {
pub bind_addr: String,
pub max_connections: usize,
pub query_timeout: Duration,
pub request_timeout: Duration,
pub runtime: Option<Arc<SharedRuntime>>,
}Expand description
Configuration for the HTTP server subsystem.
Fields§
§bind_addr: StringAddress to bind the HTTP server to (e.g., “0.0.0.0:8091”).
max_connections: usizeMaximum number of concurrent connections.
query_timeout: DurationTimeout for query execution.
request_timeout: DurationTimeout for entire request lifecycle.
runtime: Option<Arc<SharedRuntime>>Optional shared runtime. If not provided, a default one will be created.
Implementations§
Source§impl HttpConfig
impl HttpConfig
Sourcepub fn max_connections(self, max: usize) -> Self
pub fn max_connections(self, max: usize) -> Self
Set the maximum number of connections.
Sourcepub fn query_timeout(self, timeout: Duration) -> Self
pub fn query_timeout(self, timeout: Duration) -> Self
Set the query timeout.
Sourcepub fn request_timeout(self, timeout: Duration) -> Self
pub fn request_timeout(self, timeout: Duration) -> Self
Set the request timeout.
Sourcepub fn runtime(self, runtime: Arc<SharedRuntime>) -> Self
pub fn runtime(self, runtime: Arc<SharedRuntime>) -> Self
Set the shared runtime.
Trait Implementations§
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§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
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§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)