Skip to main content

relux_runtime/observe/structured/
shell.rs

1use std::time::Duration;
2
3use serde::Deserialize;
4use serde::Serialize;
5use ts_rs::TS;
6
7#[derive(Debug, Clone, Serialize, Deserialize, TS)]
8#[cfg_attr(
9    feature = "ts-export",
10    ts(export, export_to = "../../../viewer/src/types/")
11)]
12pub struct ShellRecord {
13    /// Stable mnemonic identity (matches the key in `StructuredLog.shells`).
14    pub marker: String,
15    /// Spawn-time bare name (e.g. `inner`, `__cleanup`). Display layer
16    /// may show qualified forms (`Db.inner`) derived from events.
17    pub name: String,
18    #[serde(with = "super::ts_duration_ms")]
19    #[ts(as = "f64")]
20    pub spawn_ts: Duration,
21    #[serde(with = "super::ts_duration_ms_opt")]
22    #[ts(as = "Option<f64>")]
23    pub terminate_ts: Option<Duration>,
24    pub command: String,
25}