pub struct KeyLimits {
pub name: Option<String>,
pub requests_per_minute: Option<u32>,
pub max_concurrent_jobs: Option<usize>,
pub pages_per_day: Option<u64>,
}Expand description
一个 API key 的限额,各项不设就是不限。
Fields§
§name: Option<String>日志、监控和配额记录里用的名字;不设时用 key 的指纹,key 本身不会写进日志或磁盘。
requests_per_minute: Option<u32>§max_concurrent_jobs: Option<usize>§pages_per_day: Option<u64>Trait Implementations§
impl Eq for KeyLimits
impl StructuralPartialEq for KeyLimits
Auto Trait Implementations§
impl Freeze for KeyLimits
impl RefUnwindSafe for KeyLimits
impl Send for KeyLimits
impl Sync for KeyLimits
impl Unpin for KeyLimits
impl UnsafeUnpin for KeyLimits
impl UnwindSafe for KeyLimits
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.