pub enum Phase {
Running,
Exited,
Acked,
}Expand description
Where an exec sits in its lifecycle. Mirrors ExecPhase in the model crate.
JsonSchema rides along with Serialize on every type from here down that
crosses the wire. schemars reads the same #[serde(...)] attributes serde
does, so the published schema describes what the daemon actually emits — the
rename_all below is the reason this matters rather than a formality.
Variants§
Running
Child spawned, still running (or its pipes still held by a grandchild).
Exited
Child exited and output is buffered and readable.
Acked
Caller acked; output has been released and the entry awaits collection.
Implementations§
Source§impl Phase
impl Phase
Sourcepub const ALL: [Phase; 3]
pub const ALL: [Phase; 3]
Every phase, in lifecycle order.
Public because a client that publishes the closed set — both bindings do, in
their session_constants — needs the list from the type rather than a spelled-out
copy that goes stale the first time a phase is added. The round-trip test below
holds ALL complete by exhaustive match.
Sourcepub const fn as_str(self) -> &'static str
pub const fn as_str(self) -> &'static str
The wire spelling — the exact string serde writes under rename_all above.
Here rather than in each client because two bindings each grew their own three-arm match over this enum; a variant renamed on the wire must change exactly one table, and the test below is what keeps this one equal to serde’s.
Trait Implementations§
impl Copy for Phase
Source§impl<'de> Deserialize<'de> for Phase
impl<'de> Deserialize<'de> for Phase
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl Eq for Phase
Source§impl JsonSchema for Phase
impl JsonSchema for Phase
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read more