#[non_exhaustive]pub struct SessionContextUsageParams {
pub session_id: String,
pub view_cursor: String,
pub source_range: SourceRange,
pub window_tokens: Option<u64>,
pub used_tokens: u64,
pub pressure: ContextPressureLevel,
}Expand description
session/contextUsage params: context-window pressure — the counted-once
occupancy at the latest provider-reported durable fact, joined with the
host’s pressure basis. Replace wholesale; emitted only when the
(windowTokens, usedTokens, pressure) triple changes value (identical
adoptions emit nothing).
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.session_id: StringThe owning session.
view_cursor: StringOpaque, strictly monotonic view cursor.
source_range: SourceRangeThe durable records this event folded from.
window_tokens: Option<u64>The effective context-window size from the host’s pressure basis; absent when the basis has no limit — the limit part is omitted, never invented.
used_tokens: u64Counted-once prompt tokens plus output tokens of the driving record, saturating — the honest occupancy floor.
pressure: ContextPressureLevelServer-computed pressure level over the basis thresholds.
Trait Implementations§
Source§impl Clone for SessionContextUsageParams
impl Clone for SessionContextUsageParams
Source§impl Debug for SessionContextUsageParams
impl Debug for SessionContextUsageParams
Source§impl<'de> Deserialize<'de> for SessionContextUsageParams
impl<'de> Deserialize<'de> for SessionContextUsageParams
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
impl Eq for SessionContextUsageParams
impl StructuralPartialEq for SessionContextUsageParams
Auto Trait Implementations§
impl Freeze for SessionContextUsageParams
impl RefUnwindSafe for SessionContextUsageParams
impl Send for SessionContextUsageParams
impl Sync for SessionContextUsageParams
impl Unpin for SessionContextUsageParams
impl UnsafeUnpin for SessionContextUsageParams
impl UnwindSafe for SessionContextUsageParams
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