pub struct Ctx {
pub now_rfc3339: String,
pub conn_id: u64,
pub registered_pid: Option<u32>,
pub now_ms: u64,
}Expand description
Context the reducer needs but can’t read from State (clocks, connection identity). Passed in per-call so update remains pure.
Fields§
§now_rfc3339: StringRFC3339 timestamp to stamp on new ProcessRecords. Injected (rather than read from chrono::Utc::now() inside update) to keep the function deterministic for tests.
conn_id: u64The connection on which this command arrived. Currently just used for log correlation; B.4+ will use it to route per-connection replies.
registered_pid: Option<u32>PID the connection has Registered under, if any. The server tracks this server-side and passes it on every command after the initial Register so the reducer can mark the right process Exited on Goodbye. None for the very first command on a connection (which MUST be Register, enforced server- side). (codex P1 + gemini HIGH PR #574 round-1.)
now_ms: u64Phase B.9.1 — monotonic milliseconds since some reference
epoch (the IPC server uses launcher start as the epoch).
Used by the WRR arm for per-window observability timestamps
(last_foreground_at_ms, pending_hwnds[hwnd].arrived_at_ms).
Distinct from now_rfc3339 (wall clock) because operators
reading --diag wrr want age, not absolute time.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Ctx
impl RefUnwindSafe for Ctx
impl Send for Ctx
impl Sync for Ctx
impl Unpin for Ctx
impl UnsafeUnpin for Ctx
impl UnwindSafe for Ctx
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.