pub struct SessionBlock {
pub start_time: DateTime<Utc>,
pub end_time: DateTime<Utc>,
pub actual_start_time: Option<DateTime<Utc>>,
pub actual_end_time: Option<DateTime<Utc>>,
pub sessions: Vec<SessionUsage>,
pub tokens: TokenCounts,
pub total_cost: f64,
pub models_used: Vec<String>,
pub projects_used: Vec<String>,
pub is_active: bool,
pub is_gap: bool,
pub warning: Option<String>,
}Expand description
5-hour billing block
Fields§
§start_time: DateTime<Utc>Block start time (floored to hour boundary)
end_time: DateTime<Utc>Block end time (5 hours after start)
actual_start_time: Option<DateTime<Utc>>First activity timestamp in this block (None for gap blocks)
actual_end_time: Option<DateTime<Utc>>Last activity timestamp in this block (None for gap blocks)
sessions: Vec<SessionUsage>Sessions included in this block
tokens: TokenCountsTotal tokens used in this block
total_cost: f64Total cost for this block in USD
models_used: Vec<String>List of unique models used in this block
projects_used: Vec<String>List of unique projects used in this block
is_active: boolWhether this block is currently active
is_gap: boolWhether this is a gap block (period of inactivity)
warning: Option<String>Optional warning message if approaching or exceeding token limits
Trait Implementations§
Source§impl Clone for SessionBlock
impl Clone for SessionBlock
Source§fn clone(&self) -> SessionBlock
fn clone(&self) -> SessionBlock
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SessionBlock
impl Debug for SessionBlock
Source§impl<'de> Deserialize<'de> for SessionBlock
impl<'de> Deserialize<'de> for SessionBlock
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<SessionBlock, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<SessionBlock, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Serialize for SessionBlock
impl Serialize for SessionBlock
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
Auto Trait Implementations§
impl Freeze for SessionBlock
impl RefUnwindSafe for SessionBlock
impl Send for SessionBlock
impl Sync for SessionBlock
impl Unpin for SessionBlock
impl UnsafeUnpin for SessionBlock
impl UnwindSafe for SessionBlock
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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