pub struct KeyConfig {
pub name: String,
pub key: String,
pub models: Vec<String>,
pub rate_limit: Option<KeyRateLimit>,
}Expand description
Virtual API key for client authentication.
Fields§
§name: StringHuman-readable name for this key.
key: StringThe key string clients send in Authorization header.
models: Vec<String>Which models this key can access. ["*"] means all.
rate_limit: Option<KeyRateLimit>Per-key rate limit override. Takes precedence over the global
[extensions.rate_limit] config when present.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for KeyConfig
impl<'de> Deserialize<'de> for KeyConfig
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 KeyConfig
impl RefUnwindSafe for KeyConfig
impl Send for KeyConfig
impl Sync for KeyConfig
impl Unpin for KeyConfig
impl UnsafeUnpin for KeyConfig
impl UnwindSafe for KeyConfig
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