pub enum Seen {
Marker {
line: String,
after: Duration,
},
StillRunning {
tail: String,
waited: Duration,
},
Exited {
code: Option<i32>,
tail: String,
after: Duration,
},
}Expand description
What was actually observed while waiting on a running instance — the return
of exe::ExeBoot::await_marker and of kvm::KvmBoot::await_serial_marker.
Note what is missing: there is no Ok/Fail, no “ready”. Every one of these
outcomes can be the right answer depending on what the caller asked, and a type
that guessed would be inventing the verdict the caller exists to make. It carries
the evidence instead.
It lives at the crate root, not inside a backend, because it is the one stage-2 observation shape: a process’s captured stdout/stderr and a VM’s serial console are the same question (“did the named line appear before the deadline?”) asked of two different streams, and a per-backend copy would be two definitions of “seen” that drift.
Variants§
Marker
The named marker appeared in the captured output. Carries the whole line it appeared on — the applied output, not the fact that a boolean flipped.
Fields
StillRunning
The deadline elapsed with the process still running and the marker not seen. This is not automatically a failure: for a server, still-running is the healthy state, and the caller may well have been waiting to confirm exactly that. Carries the tail of what was captured so the caller can say why.
Fields
Exited
The process terminated before the marker appeared. For a server this is the real failure, and the exit status plus tail is the evidence.