pub struct ApiKeyConfig {
pub id: String,
pub secret: SecretString,
pub enabled: bool,
pub description: Option<String>,
pub allowed_recipient_domains: Vec<String>,
pub allowed_recipients: Vec<String>,
pub rate_limit_per_min: Option<u32>,
pub burst: u32,
pub mask_recipient: Option<bool>,
}Expand description
Per-API-key configuration entry.
Fields§
§id: String§secret: SecretString§enabled: bool§description: Option<String>§allowed_recipient_domains: Vec<String>Recipient domain allowlist for this key (empty = use global policy).
allowed_recipients: Vec<String>Exact recipient address allowlist (empty = domain-level policy only).
Takes precedence over allowed_recipient_domains when non-empty.
rate_limit_per_min: Option<u32>Per-key sustained rate (tokens/minute). None = inherit [rate_limit].per_key_per_min.
burst: u32Per-key burst override. 0 = inherit [rate_limit].per_key_burst.
mask_recipient: Option<bool>Override global [logging].mask_recipient for this key (RFC 603).
None = inherit global setting.
Trait Implementations§
Source§impl Clone for ApiKeyConfig
impl Clone for ApiKeyConfig
Source§fn clone(&self) -> ApiKeyConfig
fn clone(&self) -> ApiKeyConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 ApiKeyConfig
impl Debug for ApiKeyConfig
Source§impl<'de> Deserialize<'de> for ApiKeyConfig
impl<'de> Deserialize<'de> for ApiKeyConfig
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 ApiKeyConfig
impl RefUnwindSafe for ApiKeyConfig
impl Send for ApiKeyConfig
impl Sync for ApiKeyConfig
impl Unpin for ApiKeyConfig
impl UnsafeUnpin for ApiKeyConfig
impl UnwindSafe for ApiKeyConfig
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