pub trait RunContext: SessionContext {
// Required methods
fn run_id(&self) -> &RunId;
fn cancellation_token(&self) -> &CancellationToken;
fn deadline(&self) -> Option<Instant>;
fn event_sink(&self) -> &EventSink;
fn budget(&self) -> &RunBudget;
}Expand description
Context available during a single run invocation.
Extends SessionContext with run-level controls: cancellation,
deadlines, event output, and token budget tracking.
Required Methods§
Sourcefn cancellation_token(&self) -> &CancellationToken
fn cancellation_token(&self) -> &CancellationToken
Returns a cancellation token for cooperative cancellation.
Sourcefn event_sink(&self) -> &EventSink
fn event_sink(&self) -> &EventSink
Returns the event sink for emitting structured events.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".