pub struct HttpServerConfig {
pub port: u16,
pub api_keys: HashSet<String>,
pub service_timeout_secs: u64,
}
Expand description
Configuration for the HTTP server.
Fields§
§port: u16
Port to listen on.
api_keys: HashSet<String>
An optional set of API keys for restricting access to the server. If omitted, an API key is not needed to make a request.
service_timeout_secs: u64
Timeout for service requests in seconds.
Trait Implementations§
Source§impl Clone for HttpServerConfig
impl Clone for HttpServerConfig
Source§fn clone(&self) -> HttpServerConfig
fn clone(&self) -> HttpServerConfig
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 moreSource§impl ConfigExampleSnippet for HttpServerConfig
impl ConfigExampleSnippet for HttpServerConfig
Source§fn config_example_snippet() -> String
fn config_example_snippet() -> String
Returns the configuration example snippet to be used
in new configuration files.
Source§impl Default for HttpServerConfig
impl Default for HttpServerConfig
Source§fn default() -> HttpServerConfig
fn default() -> HttpServerConfig
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for HttpServerConfigwhere
HttpServerConfig: Default,
impl<'de> Deserialize<'de> for HttpServerConfigwhere
HttpServerConfig: Default,
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<HttpServerConfig, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<HttpServerConfig, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Serialize for HttpServerConfig
impl Serialize for HttpServerConfig
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
Auto Trait Implementations§
impl Freeze for HttpServerConfig
impl RefUnwindSafe for HttpServerConfig
impl Send for HttpServerConfig
impl Sync for HttpServerConfig
impl Unpin for HttpServerConfig
impl UnwindSafe for HttpServerConfig
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