Skip to main content

DomainEvent

Enum DomainEvent 

Source
pub enum DomainEvent {
Show 31 variants SessionInitialized { runtime: RuntimeKind, device: DeviceTarget, safety: SafetyMode, speculation: SpeculationMode, }, ModelLoaded { model: ModelId, version: ModelVersion, format: ModelFormat, }, PrefillCompleted { prompt_tokens: u32, kv_len: u32, prefill_tps: u32, }, TokenGenerated { sampled: bool, }, TokenCommitted { kv_len: u32, }, GenerationCompleted { total_tokens: u32, stop: StopReason, }, SessionReset, HybridRelayConsulted, PromptCompressed { input_tokens: u32, output_tokens: u32, ratio_milli: u32, }, CompressionSkipped { reason: DegradeReason, }, DraftProposed { draft_len: u8, }, DraftVerified { accepted: u8, first_reject: u8, }, SpeculationDisabled { reason: DegradeReason, }, GrammarSwitched { from_state: u32, to_state: u32, }, TokenMaskApplied { allowed: u32, }, GrammarViolationBlocked, SafetyModeSelected { mode: SafetyMode, }, LogitsSteered { adjustment_norm_milli: u32, }, SafetyViolationDetected { score_milli: u16, threshold_milli: u16, }, ClaimBacktracked { claim_index: u32, }, SafetyDisabled { reason: DegradeReason, }, MemoryPlanCreated { total_bytes: u64, sram_bytes: u64, dram_bytes: u64, }, KvCacheCompacted { reclaimed: u32, }, MemoryBudgetExceeded { requested_bytes: u64, budget_bytes: u64, }, DeviceProfiled { profile: DeviceTarget, npu_tops: u16, bandwidth_gbs: u16, }, DelegateSelected { partitions: u8, }, DelegateFellBack, ModelSignatureVerified { model: ModelId, version: ModelVersion, }, ModelSignatureRejected { model: ModelId, }, MetricsSampled { decode_tps: u32, ttft_ms: u32, peak_bytes: u64, }, FrontierLlmConsulted { provider_hash: u32, prompt_tokens: u32, completion_tokens: u32, },
}
Expand description

Every fact the pipeline emits. Carries only ids, counts, enums, and fixed-point numbers — never content.

Variants§

§

SessionInitialized

Fields

§runtime: RuntimeKind
§safety: SafetyMode
§speculation: SpeculationMode
§

ModelLoaded

Fields

§model: ModelId
§

PrefillCompleted

Fields

§prompt_tokens: u32
§kv_len: u32
§prefill_tps: u32
§

TokenGenerated

Fields

§sampled: bool
§

TokenCommitted

Fields

§kv_len: u32
§

GenerationCompleted

Fields

§total_tokens: u32
§

SessionReset

§

HybridRelayConsulted

§

PromptCompressed

Fields

§input_tokens: u32
§output_tokens: u32
§ratio_milli: u32

Compression ratio × 1000 (e.g. 250 = 0.25 = 4× shorter).

§

CompressionSkipped

Fields

§

DraftProposed

Fields

§draft_len: u8
§

DraftVerified

Fields

§accepted: u8
§first_reject: u8
§

SpeculationDisabled

Fields

§

GrammarSwitched

Fields

§from_state: u32
§to_state: u32
§

TokenMaskApplied

Fields

§allowed: u32
§

GrammarViolationBlocked

§

SafetyModeSelected

Fields

§

LogitsSteered

Fields

§adjustment_norm_milli: u32
§

SafetyViolationDetected

Fields

§score_milli: u16
§threshold_milli: u16
§

ClaimBacktracked

Fields

§claim_index: u32
§

SafetyDisabled

Fields

§

MemoryPlanCreated

Fields

§total_bytes: u64
§sram_bytes: u64
§dram_bytes: u64
§

KvCacheCompacted

Fields

§reclaimed: u32
§

MemoryBudgetExceeded

Fields

§requested_bytes: u64
§budget_bytes: u64
§

DeviceProfiled

Fields

§npu_tops: u16
§bandwidth_gbs: u16
§

DelegateSelected

Fields

§partitions: u8
§

DelegateFellBack

§

ModelSignatureVerified

Fields

§model: ModelId
§

ModelSignatureRejected

Fields

§model: ModelId
§

MetricsSampled

Fields

§decode_tps: u32
§ttft_ms: u32
§peak_bytes: u64
§

FrontierLlmConsulted

Emitted when the opt-in cloud backend is consulted (parallel to HybridRelayConsulted). provider_hash is a CRC32 of the provider prefix — not the API key or any content.

Fields

§provider_hash: u32
§prompt_tokens: u32
§completion_tokens: u32

Trait Implementations§

Source§

impl Clone for DomainEvent

Source§

fn clone(&self) -> DomainEvent

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for DomainEvent

Source§

impl Debug for DomainEvent

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Eq for DomainEvent

Source§

impl PartialEq for DomainEvent

Source§

fn eq(&self, other: &DomainEvent) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for DomainEvent

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.