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§
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
Sourcefn context_source_map(&self) -> DebugPromptSourceMap
fn context_source_map(&self) -> DebugPromptSourceMap
The report builder stays host-owned; format and JSON serialization consume only this data-only source map.
fn prompt_context(&self) -> DebugPromptContext
Sourcefn tool_snapshot(&self) -> Option<DebugToolSnapshot>
fn tool_snapshot(&self) -> Option<DebugToolSnapshot>
None means no prepared snapshot exists; argument validation occurs
only after this check in the portable /tools handler.
Sourcefn inspect_cache(
&self,
) -> Result<DebugCacheInspectionObservation, DebugCacheInspectionUnavailable>
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.
Sourcefn remember_cache_inspection(&mut self, inspection: DebugPromptInspection)
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".