pub struct BillingBlockParams<'a> {
pub data_loader: &'a DataLoader,
pub aggregator: &'a Aggregator,
pub cost_mode: CostMode,
pub session_duration_hours: f64,
pub project: Option<&'a str>,
pub since_date: Option<NaiveDate>,
pub until_date: Option<NaiveDate>,
pub active: bool,
pub recent: bool,
pub token_limit: Option<&'a str>,
pub approx_max_tokens: f64,
}Expand description
Parameters for creating and filtering billing blocks
Fields§
§data_loader: &'a DataLoaderDataLoader instance to load usage entries
aggregator: &'a AggregatorAggregator instance to create billing blocks
cost_mode: CostModeCost calculation mode
session_duration_hours: f64Session duration threshold in hours
project: Option<&'a str>Optional project filter
since_date: Option<NaiveDate>Optional start date filter
until_date: Option<NaiveDate>Optional end date filter
active: boolFilter for active blocks only
recent: boolFilter for recent blocks only
token_limit: Option<&'a str>Optional token limit warning threshold
approx_max_tokens: f64Approximate maximum tokens per block for percentage calculations
Auto Trait Implementations§
impl<'a> Freeze for BillingBlockParams<'a>
impl<'a> !RefUnwindSafe for BillingBlockParams<'a>
impl<'a> Send for BillingBlockParams<'a>
impl<'a> Sync for BillingBlockParams<'a>
impl<'a> Unpin for BillingBlockParams<'a>
impl<'a> !UnwindSafe for BillingBlockParams<'a>
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