pub struct JsonFormatter;Expand description
JSON formatter for machine-readable output
Produces structured JSON output that can be easily parsed by other tools or used in automation pipelines. All data is preserved in its raw form for maximum flexibility.
Trait Implementations§
Source§impl OutputFormatter for JsonFormatter
impl OutputFormatter for JsonFormatter
Source§fn format_daily(&self, data: &[DailyUsage], totals: &Totals) -> String
fn format_daily(&self, data: &[DailyUsage], totals: &Totals) -> String
Format daily usage data with totals
Source§fn format_daily_by_instance(
&self,
data: &[DailyInstanceUsage],
totals: &Totals,
) -> String
fn format_daily_by_instance( &self, data: &[DailyInstanceUsage], totals: &Totals, ) -> String
Format daily usage data grouped by instance
Source§fn format_sessions(
&self,
data: &[SessionUsage],
totals: &Totals,
_tz: &Tz,
) -> String
fn format_sessions( &self, data: &[SessionUsage], totals: &Totals, _tz: &Tz, ) -> String
Format session usage data with totals
Source§fn format_monthly(&self, data: &[MonthlyUsage], totals: &Totals) -> String
fn format_monthly(&self, data: &[MonthlyUsage], totals: &Totals) -> String
Format monthly usage data with totals
Source§fn format_weekly(&self, data: &[WeeklyUsage], totals: &Totals) -> String
fn format_weekly(&self, data: &[WeeklyUsage], totals: &Totals) -> String
Format weekly usage data with totals
Source§fn format_blocks(&self, data: &[SessionBlock], _tz: &Tz) -> String
fn format_blocks(&self, data: &[SessionBlock], _tz: &Tz) -> String
Format billing blocks (5-hour windows)
Auto Trait Implementations§
impl Freeze for JsonFormatter
impl RefUnwindSafe for JsonFormatter
impl Send for JsonFormatter
impl Sync for JsonFormatter
impl Unpin for JsonFormatter
impl UnsafeUnpin for JsonFormatter
impl UnwindSafe for JsonFormatter
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> 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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more