pub struct ReportCtx {
pub window: TimeWindow,
pub project: Option<String>,
pub include_sidechain: bool,
pub pricing: Pricing,
}Expand description
Everything a report is given besides the scanner.
Fields§
§window: TimeWindow§project: Option<String>§include_sidechain: boolSidechain (subagent) events are real spend and are included by default.
pricing: PricingThe price table as it is now. Cost is derived at read time from this
and the event’s stored token counts, so editing config.toml re-prices
the existing store without a re-ingest.
Implementations§
Source§impl ReportCtx
impl ReportCtx
pub fn new( window: TimeWindow, project: Option<String>, include_sidechain: bool, ) -> Self
Sourcepub fn with_pricing(self, pricing: Pricing) -> Self
pub fn with_pricing(self, pricing: Pricing) -> Self
Price this run from the user’s config. Without it the price table is empty and every cost falls back to what was stored at ingest.
Sourcepub fn with_window(&self, window: TimeWindow) -> Self
pub fn with_window(&self, window: TimeWindow) -> Self
The same context over a different window, for compare.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ReportCtx
impl RefUnwindSafe for ReportCtx
impl Send for ReportCtx
impl Sync for ReportCtx
impl Unpin for ReportCtx
impl UnsafeUnpin for ReportCtx
impl UnwindSafe for ReportCtx
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