pub struct UsageReportHandler { /* private fields */ }
Expand description
Usage report handler
Implementations§
Source§impl UsageReportHandler
impl UsageReportHandler
pub fn new(client: RestClient) -> Self
Sourcepub async fn latest(&self) -> Result<UsageReport>
pub async fn latest(&self) -> Result<UsageReport>
Get latest usage report
Sourcepub async fn list(&self) -> Result<Vec<UsageReport>>
pub async fn list(&self) -> Result<Vec<UsageReport>>
List all usage reports
Sourcepub async fn get(&self, report_id: &str) -> Result<UsageReport>
pub async fn get(&self, report_id: &str) -> Result<UsageReport>
Get specific usage report
Sourcepub async fn generate(&self) -> Result<UsageReport>
pub async fn generate(&self) -> Result<UsageReport>
Generate new usage report
Sourcepub async fn get_config(&self) -> Result<UsageReportConfig>
pub async fn get_config(&self) -> Result<UsageReportConfig>
Get usage report configuration
Sourcepub async fn update_config(
&self,
config: UsageReportConfig,
) -> Result<UsageReportConfig>
pub async fn update_config( &self, config: UsageReportConfig, ) -> Result<UsageReportConfig>
Update usage report configuration
Sourcepub async fn download_csv(&self, report_id: &str) -> Result<String>
pub async fn download_csv(&self, report_id: &str) -> Result<String>
Download usage report as CSV
Auto Trait Implementations§
impl Freeze for UsageReportHandler
impl !RefUnwindSafe for UsageReportHandler
impl Send for UsageReportHandler
impl Sync for UsageReportHandler
impl Unpin for UsageReportHandler
impl !UnwindSafe for UsageReportHandler
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