Skip to main content

CommandDebugDiagnosticsContext

Trait CommandDebugDiagnosticsContext 

Source
pub trait CommandDebugDiagnosticsContext {
    // Required methods
    fn balance_projection(&self) -> DebugBalanceProjection;
    fn system_projection(&self) -> DebugSystemProjection;
    fn token_projection(&self) -> DebugTokenProjection;
    fn cost_projection(&self) -> DebugCostProjection;
    fn cache_telemetry(&self) -> DebugCacheTelemetry;
    fn context_source_map(&self) -> DebugPromptSourceMap;
    fn prompt_context(&self) -> DebugPromptContext;
    fn tool_snapshot(&self) -> Option<DebugToolSnapshot>;
    fn inspect_cache(
        &self,
    ) -> Result<DebugCacheInspectionObservation, DebugCacheInspectionUnavailable>;
    fn remember_cache_inspection(&mut self, inspection: DebugPromptInspection);
}
Expand description

Narrow, synchronous data boundary for the debug diagnostics slice.

No concrete provider, App, completed message, or network operation crosses this interface. Add operations only when their live branches require them. Portable handlers consume these facts without concrete host access.

Required Methods§

Source

fn balance_projection(&self) -> DebugBalanceProjection

Source

fn system_projection(&self) -> DebugSystemProjection

Source

fn token_projection(&self) -> DebugTokenProjection

Source

fn cost_projection(&self) -> DebugCostProjection

Source

fn cache_telemetry(&self) -> DebugCacheTelemetry

Source

fn context_source_map(&self) -> DebugPromptSourceMap

The report builder stays host-owned; format and JSON serialization consume only this data-only source map.

Source

fn prompt_context(&self) -> DebugPromptContext

Source

fn tool_snapshot(&self) -> Option<DebugToolSnapshot>

None means no prepared snapshot exists; argument validation occurs only after this check in the portable /tools handler.

Source

fn inspect_cache( &self, ) -> Result<DebugCacheInspectionObservation, DebugCacheInspectionUnavailable>

Route resolution and request inspection remain host-owned. This call must not update the remembered inspection on failure or success.

Source

fn remember_cache_inspection(&mut self, inspection: DebugPromptInspection)

Store the already-observed inspection after portable rendering, without rebuilding or re-inspecting the request. The baseline also commits on JSON serialization fallback.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§