pub struct CodingPlanUsageRequest;Expand description
Coding Plan usage / quota query request
(GET /api/monitor/usage/quota/limit).
Construct with CodingPlanUsageRequest::new and execute with
CodingPlanUsageRequest::send_via. Credentials and transport live on the
ZaiClient, passed to send_via.
use zai_rs::usage::CodingPlanUsageRequest;
use zai_rs::client::ZaiClient;
let resp = CodingPlanUsageRequest::new().send_via(&client).await?;
if let Some(five_hour) = resp.time_limit() {
tracing::info!("5h window: {}% used", five_hour.percentage);
}Implementations§
Source§impl CodingPlanUsageRequest
impl CodingPlanUsageRequest
Sourcepub fn new() -> Self
pub fn new() -> Self
Build a quota query. The base URL, credentials and transport are
supplied by the ZaiClient passed to Self::send_via.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for CodingPlanUsageRequest
impl RefUnwindSafe for CodingPlanUsageRequest
impl Send for CodingPlanUsageRequest
impl Sync for CodingPlanUsageRequest
impl Unpin for CodingPlanUsageRequest
impl UnsafeUnpin for CodingPlanUsageRequest
impl UnwindSafe for CodingPlanUsageRequest
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