pub struct ApiQuota {
pub quota_id: String,
pub client_id: String,
pub requests_per_day: u64,
pub requests_used_today: u64,
pub scan_credits: u64,
pub scan_credits_used: u64,
pub api_calls_this_hour: u64,
pub last_reset_time: u64,
}Expand description
Host-supplied quota and usage record.
The model deliberately has no default constructor: limits, identifiers, and reset timestamps must come from the integrating host rather than from fabricated product tiers.
Fields§
§quota_id: String§client_id: String§requests_per_day: u64§requests_used_today: u64§scan_credits: u64§scan_credits_used: u64§api_calls_this_hour: u64§last_reset_time: u64Implementations§
Source§impl ApiQuota
impl ApiQuota
pub fn requests_remaining(&self) -> u64
pub fn credits_remaining(&self) -> u64
pub fn quota_exceeded(&self) -> bool
Trait Implementations§
Source§impl<'de> Deserialize<'de> for ApiQuota
impl<'de> Deserialize<'de> for ApiQuota
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
impl Eq for ApiQuota
impl StructuralPartialEq for ApiQuota
Auto Trait Implementations§
impl Freeze for ApiQuota
impl RefUnwindSafe for ApiQuota
impl Send for ApiQuota
impl Sync for ApiQuota
impl Unpin for ApiQuota
impl UnsafeUnpin for ApiQuota
impl UnwindSafe for ApiQuota
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more