pub struct KeyRateLimit {
pub requests_per_minute: Option<u64>,
pub tokens_per_minute: Option<u64>,
}Expand description
Per-key rate limit override. When set on a key, these values take
precedence over the global [extensions.rate_limit] config.
Fields§
§requests_per_minute: Option<u64>§tokens_per_minute: Option<u64>Trait Implementations§
Source§impl Clone for KeyRateLimit
impl Clone for KeyRateLimit
Source§fn clone(&self) -> KeyRateLimit
fn clone(&self) -> KeyRateLimit
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 KeyRateLimit
impl Debug for KeyRateLimit
Source§impl<'de> Deserialize<'de> for KeyRateLimit
impl<'de> Deserialize<'de> for KeyRateLimit
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 KeyRateLimit
impl RefUnwindSafe for KeyRateLimit
impl Send for KeyRateLimit
impl Sync for KeyRateLimit
impl Unpin for KeyRateLimit
impl UnsafeUnpin for KeyRateLimit
impl UnwindSafe for KeyRateLimit
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