pub enum ContextCompilerEvent {
BlockEmitted {
source: &'static str,
kind: SegmentKind,
original_tokens: usize,
kept_tokens: usize,
},
BudgetAllocated {
total: usize,
per_kind: Vec<(SegmentKind, usize)>,
},
TierSelected {
tier: Tier,
reason: &'static str,
},
SummarizerInvoked {
duration_ms: u64,
segments_in: usize,
summary_tokens: usize,
},
SummarizerFailed {
duration_ms: u64,
error_kind: &'static str,
},
BudgetExceeded {
overage: usize,
},
}Expand description
Structured event emitted by ContextCompiler during prompt composition.
All variants are intentionally cheap to construct (no large captures) so emission stays under 1 ms even under high-frequency turns.
Variants§
BlockEmitted
A single segment survived selection and was emitted into the composed prompt.
Fields
§
kind: SegmentKindCoarse segment kind for dashboard grouping.
BudgetAllocated
Total budget allocated and the per-kind reservation.
Fields
§
per_kind: Vec<(SegmentKind, usize)>Per-kind reserved tokens (sum may be ≤ total).
TierSelected
Capability tier selected for this compose() call.
Fields
SummarizerInvoked
Summarizer was invoked successfully (Tier ≥ 1).
Fields
SummarizerFailed
Summarizer call failed; orchestrator auto-degraded to heuristic for this turn.
Fields
BudgetExceeded
Total budget was exceeded even after compaction; safety-net truncation applied.
Trait Implementations§
Source§impl Clone for ContextCompilerEvent
impl Clone for ContextCompilerEvent
Source§fn clone(&self) -> ContextCompilerEvent
fn clone(&self) -> ContextCompilerEvent
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for ContextCompilerEvent
impl RefUnwindSafe for ContextCompilerEvent
impl Send for ContextCompilerEvent
impl Sync for ContextCompilerEvent
impl Unpin for ContextCompilerEvent
impl UnsafeUnpin for ContextCompilerEvent
impl UnwindSafe for ContextCompilerEvent
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