pub struct RuntimeRealtimeProductTurnHandle { /* private fields */ }Expand description
Runtime-backed RealtimeProductTurnHandle impl.
Implementations§
Trait Implementations§
Source§impl RealtimeProductTurnHandle for RuntimeRealtimeProductTurnHandle
impl RealtimeProductTurnHandle for RuntimeRealtimeProductTurnHandle
Source§fn turn_in_flight(&self) -> Result<bool, DslTransitionError>
fn turn_in_flight(&self) -> Result<bool, DslTransitionError>
Fire
ProductTurnInFlight. Returns Ok(true) when the turn
advanced from Idle; Ok(false) when already in-flight.Source§fn turn_committed(&self) -> Result<bool, DslTransitionError>
fn turn_committed(&self) -> Result<bool, DslTransitionError>
Fire
ProductTurnCommitted. Returns Ok(true) when the phase
advanced (AwaitingProgress → Committed, or OutputStarted →
Preemptible); Ok(false) otherwise.Source§fn output_started(&self) -> Result<bool, DslTransitionError>
fn output_started(&self) -> Result<bool, DslTransitionError>
Fire
ProductOutputStarted. Returns Ok(true) when the phase
advanced (AwaitingProgress → OutputStarted, or Committed →
Preemptible); Ok(false) otherwise.Source§fn turn_interrupted(&self) -> Result<bool, DslTransitionError>
fn turn_interrupted(&self) -> Result<bool, DslTransitionError>
Fire
ProductTurnInterrupted. Returns Ok(true) when the
output-started milestone was cleared (Preemptible →
Committed, or OutputStarted → AwaitingProgress); Ok(false)
otherwise.Source§fn turn_terminal(&self) -> Result<bool, DslTransitionError>
fn turn_terminal(&self) -> Result<bool, DslTransitionError>
Fire
ProductTurnTerminal. Returns Ok(true) when the phase
advanced back to Idle from any non-Idle phase; Ok(false)
when already Idle.Source§fn current_phase(&self) -> RealtimeProductTurnPhase
fn current_phase(&self) -> RealtimeProductTurnPhase
Read the current typed phase from the DSL.
Source§fn projection_advance_observed(
&self,
advanced_at_ms: u64,
) -> Result<bool, DslTransitionError>
fn projection_advance_observed( &self, advanced_at_ms: u64, ) -> Result<bool, DslTransitionError>
Fire
RealtimeProjectionAdvanceObserved { advanced_at_ms } — the
shell received a SessionContextAdvanced observer tick. The DSL
decides the resulting freshness based on the current product-turn
phase (live → StaleDeferred; idle → StaleImmediate). Read moreSource§fn projection_refreshed(
&self,
observed_ms: u64,
) -> Result<bool, DslTransitionError>
fn projection_refreshed( &self, observed_ms: u64, ) -> Result<bool, DslTransitionError>
Fire
RealtimeProjectionRefreshed { observed_ms } — the shell
completed a provider-session refresh drain. Returns to Clean.Source§fn projection_baseline_observed(
&self,
observed_ms: u64,
) -> Result<bool, DslTransitionError>
fn projection_baseline_observed( &self, observed_ms: u64, ) -> Result<bool, DslTransitionError>
Fire
RealtimeProjectionBaselineObserved { observed_ms } — the shell
observed a provider-owned session-context mutation that the currently
open provider session already contains. This may advance a clean
frontier, but it must not clear StaleDeferred / StaleImmediate;
only a real refresh drain may make stale state clean.Source§fn projection_reset(&self, baseline_ms: u64) -> Result<bool, DslTransitionError>
fn projection_reset(&self, baseline_ms: u64) -> Result<bool, DslTransitionError>
Fire
RealtimeProjectionReset { baseline_ms } — the shell closed
or reconnected the product session and wants to re-seed the
Clean baseline at the current DSL session-context watermark.Source§fn projection_freshness(&self) -> RealtimeProjectionFreshness
fn projection_freshness(&self) -> RealtimeProjectionFreshness
Read the current typed projection-freshness discriminant from the
DSL. The shell reads this at the canonical drain sites (observer
tick arrival, input-chunk refresh gate, turn-end drain) to decide
whether to rebuild the provider session’s projection.
Source§fn projection_frontier_ms(&self) -> u64
fn projection_frontier_ms(&self) -> u64
Read the current monotonic frontier watermark from the DSL.
Source§fn install_projection_freshness_observer(
&self,
observer: Arc<dyn RealtimeProjectionFreshnessObserver>,
)
fn install_projection_freshness_observer( &self, observer: Arc<dyn RealtimeProjectionFreshnessObserver>, )
Install a typed observer for
RealtimeProjectionFreshnessChanged
effect emission. Implementations without an installed observer
drop the effect (standalone / WASM paths).Source§fn install_projection_freshness_observer_with_snapshot(
&self,
observer: Arc<dyn RealtimeProjectionFreshnessObserver>,
) -> (RealtimeProjectionFreshness, u64)
fn install_projection_freshness_observer_with_snapshot( &self, observer: Arc<dyn RealtimeProjectionFreshnessObserver>, ) -> (RealtimeProjectionFreshness, u64)
Atomically install a typed observer and return the current
freshness snapshot as a single authority read. Implementations
MUST hold the same authority lock that projection transitions use
for both observer installation and the
(freshness, frontier)
sample, so no RealtimeProjectionFreshnessChanged effect can
slip between “observer visible” and “socket seeded from the DSL”. Read moreSource§fn classify_client_input_submitted(&self) -> Result<bool, DslTransitionError>
fn classify_client_input_submitted(&self) -> Result<bool, DslTransitionError>
Fire
ClassifyRealtimeClientInputSubmitted — the client’s input
chunk was accepted by the provider session. Returns Ok(false)
when already ReattachAndRecover.Source§fn classify_mid_turn_activity(&self) -> Result<bool, DslTransitionError>
fn classify_mid_turn_activity(&self) -> Result<bool, DslTransitionError>
Fire
ClassifyRealtimeMidTurnActivity — the provider session
emitted a non-terminal activity (e.g. a tool call) inside a live
turn. Returns Ok(false) when already ReattachAndRecover.Source§fn classify_turn_terminated(&self) -> Result<bool, DslTransitionError>
fn classify_turn_terminated(&self) -> Result<bool, DslTransitionError>
Fire
ClassifyRealtimeTurnTerminated — the current turn reached
a logical terminal stop reason. Also folds in the pending
StaleDeferred → StaleImmediate promotion so the turn-end drain
site picks up any pending advance.Source§fn reconnect_policy_on_clean_close(&self) -> RealtimeReconnectPolicy
fn reconnect_policy_on_clean_close(&self) -> RealtimeReconnectPolicy
Read the typed reconnect-policy classification. The shell reads
this at the clean-close branch to decide whether a clean provider-
session close should trigger a proactive reattach
(
ReattachAndRecover) or close the channel cleanly
(CleanExit).Source§fn is_in_flight(&self) -> bool
fn is_in_flight(&self) -> bool
True iff the provider session has an active turn (any non-
Idle
phase). Used by the realtime-WS projection-refresh gate.Source§fn should_preempt_on_input(&self) -> bool
fn should_preempt_on_input(&self) -> bool
True iff an input chunk arriving now should preempt the current
provider-managed turn — i.e. the turn has reached
Preemptible. Read moreSource§fn is_projection_stale_immediate(&self) -> bool
fn is_projection_stale_immediate(&self) -> bool
Convenience accessor:
true iff the current freshness is
StaleImmediate — the shell uses this at drain sites.Auto Trait Implementations§
impl !Freeze for RuntimeRealtimeProductTurnHandle
impl RefUnwindSafe for RuntimeRealtimeProductTurnHandle
impl Send for RuntimeRealtimeProductTurnHandle
impl Sync for RuntimeRealtimeProductTurnHandle
impl Unpin for RuntimeRealtimeProductTurnHandle
impl UnsafeUnpin for RuntimeRealtimeProductTurnHandle
impl UnwindSafe for RuntimeRealtimeProductTurnHandle
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