pub struct UsageUpdate {
pub used: u64,
pub size: u64,
pub cost: Option<Cost>,
}Expand description
usage_update payload. Context window and
cumulative cost update for a session.
Fields§
§used: u64Tokens currently in context.
size: u64Total context window size in tokens.
cost: Option<Cost>Cumulative session cost. Absent when the agent does not track cost.
Trait Implementations§
Source§impl Clone for UsageUpdate
impl Clone for UsageUpdate
Source§impl Debug for UsageUpdate
impl Debug for UsageUpdate
Source§impl<'de> Deserialize<'de> for UsageUpdate
impl<'de> Deserialize<'de> for UsageUpdate
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for UsageUpdate
impl PartialEq for UsageUpdate
Source§impl Serialize for UsageUpdate
impl Serialize for UsageUpdate
impl StructuralPartialEq for UsageUpdate
Auto Trait Implementations§
impl Freeze for UsageUpdate
impl RefUnwindSafe for UsageUpdate
impl Send for UsageUpdate
impl Sync for UsageUpdate
impl Unpin for UsageUpdate
impl UnsafeUnpin for UsageUpdate
impl UnwindSafe for UsageUpdate
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