pub struct CodingPlanUsageSummary {
pub code: i64,
pub msg: Option<String>,
pub success: bool,
pub level: Option<String>,
pub limits: Vec<CodingPlanQuotaSummary>,
}Expand description
Easy-to-use Coding Plan usage view.
Fields§
§code: i64Business status code (0 / 200 indicate success).
msg: Option<String>Human-readable status message.
success: boolWhether the request succeeded.
level: Option<String>Subscribed plan level, if reported by the server.
limits: Vec<CodingPlanQuotaSummary>All quota windows as normalized summaries.
Implementations§
Source§impl CodingPlanUsageSummary
impl CodingPlanUsageSummary
Sourcepub fn find_limit(&self, type_: &str) -> Option<&CodingPlanQuotaSummary>
pub fn find_limit(&self, type_: &str) -> Option<&CodingPlanQuotaSummary>
Find the first quota window matching a raw type string.
Sourcepub fn time_limit(&self) -> Option<&CodingPlanQuotaSummary>
pub fn time_limit(&self) -> Option<&CodingPlanQuotaSummary>
The per-5-hour time window, if present.
Sourcepub fn tokens_limit(&self) -> Option<&CodingPlanQuotaSummary>
pub fn tokens_limit(&self) -> Option<&CodingPlanQuotaSummary>
The weekly tokens window, if present.
Trait Implementations§
Source§impl Clone for CodingPlanUsageSummary
impl Clone for CodingPlanUsageSummary
Source§fn clone(&self) -> CodingPlanUsageSummary
fn clone(&self) -> CodingPlanUsageSummary
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 CodingPlanUsageSummary
impl Debug for CodingPlanUsageSummary
Source§impl Default for CodingPlanUsageSummary
impl Default for CodingPlanUsageSummary
Source§fn default() -> CodingPlanUsageSummary
fn default() -> CodingPlanUsageSummary
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for CodingPlanUsageSummary
impl RefUnwindSafe for CodingPlanUsageSummary
impl Send for CodingPlanUsageSummary
impl Sync for CodingPlanUsageSummary
impl Unpin for CodingPlanUsageSummary
impl UnsafeUnpin for CodingPlanUsageSummary
impl UnwindSafe for CodingPlanUsageSummary
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<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,
Source§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.
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