pub struct EnvApiKeyConfig {
pub enabled: Option<bool>,
pub keys: Option<Vec<String>>,
pub header_name: Option<String>,
pub query_param_name: Option<String>,
pub allow_query_param: Option<bool>,
pub key_prefix: Option<String>,
}Expand description
Environment variable configuration for API key (when feature enabled)
All fields are Option<T> to distinguish between “not set from environment”
and “explicitly set from environment”.
§Semantics
None- The environment variable was not set; use the config file or default valueSome(value)- The environment variable was explicitly set tovalue
Fields§
§enabled: Option<bool>Whether API key authentication is enabled
keys: Option<Vec<String>>List of valid API keys
header_name: Option<String>Header name for API key
query_param_name: Option<String>Query parameter name for API key
allow_query_param: Option<bool>Whether to allow API key in query parameters
key_prefix: Option<String>API key prefix
Trait Implementations§
Source§impl Clone for EnvApiKeyConfig
impl Clone for EnvApiKeyConfig
Source§fn clone(&self) -> EnvApiKeyConfig
fn clone(&self) -> EnvApiKeyConfig
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 EnvApiKeyConfig
impl Debug for EnvApiKeyConfig
Source§impl Default for EnvApiKeyConfig
impl Default for EnvApiKeyConfig
Source§fn default() -> EnvApiKeyConfig
fn default() -> EnvApiKeyConfig
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for EnvApiKeyConfig
impl RefUnwindSafe for EnvApiKeyConfig
impl Send for EnvApiKeyConfig
impl Sync for EnvApiKeyConfig
impl Unpin for EnvApiKeyConfig
impl UnsafeUnpin for EnvApiKeyConfig
impl UnwindSafe for EnvApiKeyConfig
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