#[non_exhaustive]pub struct ContextUsage {
pub window_tokens: Option<u64>,
pub used_tokens: u64,
pub pressure: ContextPressureLevel,
}Expand description
The snapshot contextUsage block: the latest (windowTokens, usedTokens, pressure) triple; the snapshot member is null until the fold’s generation
chain holds a tracked anchor AND the current basis is present (absent is
never fabricated).
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.window_tokens: Option<u64>The effective context-window size; absent when the basis has no limit.
used_tokens: u64Counted-once occupancy at the latest provider-reported fact.
pressure: ContextPressureLevelServer-computed pressure level.
Trait Implementations§
Source§impl Clone for ContextUsage
impl Clone for ContextUsage
Source§impl Debug for ContextUsage
impl Debug for ContextUsage
Source§impl<'de> Deserialize<'de> for ContextUsage
impl<'de> Deserialize<'de> for ContextUsage
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 ContextUsage
Source§impl PartialEq for ContextUsage
impl PartialEq for ContextUsage
Source§impl Serialize for ContextUsage
impl Serialize for ContextUsage
impl StructuralPartialEq for ContextUsage
Auto Trait Implementations§
impl Freeze for ContextUsage
impl RefUnwindSafe for ContextUsage
impl Send for ContextUsage
impl Sync for ContextUsage
impl Unpin for ContextUsage
impl UnsafeUnpin for ContextUsage
impl UnwindSafe for ContextUsage
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