pub struct CodingPlanUsageResponse {
pub code: i64,
pub msg: Option<String>,
pub success: bool,
pub data: CodingPlanUsageData,
}Expand description
Standard {code, msg, success, data} envelope used by the monitor API.
Fields§
§code: i64Business status code (0 / 200 indicate success).
msg: Option<String>Human-readable status message.
success: boolWhether the request succeeded.
data: CodingPlanUsageDataQuota payload.
Implementations§
Source§impl CodingPlanUsageResponse
impl CodingPlanUsageResponse
Sourcepub fn limits(&self) -> &[CodingPlanQuotaLimit]
pub fn limits(&self) -> &[CodingPlanQuotaLimit]
The active quota windows.
Sourcepub fn find_limit(&self, type_: &str) -> Option<&CodingPlanQuotaLimit>
pub fn find_limit(&self, type_: &str) -> Option<&CodingPlanQuotaLimit>
Find the first window matching a limit type (case-insensitive).
Sourcepub fn time_limit(&self) -> Option<&CodingPlanQuotaLimit>
pub fn time_limit(&self) -> Option<&CodingPlanQuotaLimit>
The per-5-hour time window, if present.
Sourcepub fn tokens_limit(&self) -> Option<&CodingPlanQuotaLimit>
pub fn tokens_limit(&self) -> Option<&CodingPlanQuotaLimit>
The weekly tokens window, if present.
Sourcepub fn summary(&self) -> CodingPlanUsageSummary
pub fn summary(&self) -> CodingPlanUsageSummary
Build an easy-to-use normalized view of the quota response.
Sourcepub fn time_limit_summary(&self) -> Option<CodingPlanQuotaSummary>
pub fn time_limit_summary(&self) -> Option<CodingPlanQuotaSummary>
The per-5-hour window as a normalized summary, if present.
Sourcepub fn tokens_limit_summary(&self) -> Option<CodingPlanQuotaSummary>
pub fn tokens_limit_summary(&self) -> Option<CodingPlanQuotaSummary>
The weekly tokens window as a normalized summary, if present.
Trait Implementations§
Source§impl Clone for CodingPlanUsageResponse
impl Clone for CodingPlanUsageResponse
Source§fn clone(&self) -> CodingPlanUsageResponse
fn clone(&self) -> CodingPlanUsageResponse
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 CodingPlanUsageResponse
impl Debug for CodingPlanUsageResponse
Source§impl<'de> Deserialize<'de> for CodingPlanUsageResponse
impl<'de> Deserialize<'de> for CodingPlanUsageResponse
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
Source§impl Display for CodingPlanUsageResponse
impl Display for CodingPlanUsageResponse
Auto Trait Implementations§
impl Freeze for CodingPlanUsageResponse
impl RefUnwindSafe for CodingPlanUsageResponse
impl Send for CodingPlanUsageResponse
impl Sync for CodingPlanUsageResponse
impl Unpin for CodingPlanUsageResponse
impl UnsafeUnpin for CodingPlanUsageResponse
impl UnwindSafe for CodingPlanUsageResponse
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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>,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<T> ValidateIp for Twhere
T: ToString,
impl<T> ValidateIp for Twhere
T: ToString,
Source§fn validate_ipv4(&self) -> bool
fn validate_ipv4(&self) -> bool
Validates whether the given string is an IP V4
Source§fn validate_ipv6(&self) -> bool
fn validate_ipv6(&self) -> bool
Validates whether the given string is an IP V6
Source§fn validate_ip(&self) -> bool
fn validate_ip(&self) -> bool
Validates whether the given string is an IP