pub enum CaptureState {
Captured,
Incomplete {
reason: String,
},
NotCaptured {
reason: String,
},
}Expand description
Whether a module’s stderr is being captured, and if not, why not.
Typed rather than nullable so NotCaptured has to be handled rather than
defaulted past. An empty tail and an uncaptured one send an operator in
opposite directions – one says the module printed nothing before dying, the
other says nobody was listening – and rendering them alike is the defect this
module exists to fix, reproduced one layer up.
Variants§
Captured
A reader is attached, or was attached and reached clean EOF.
Incomplete
Retained entries are valid, but capture ended before clean EOF, or the pipe of a process the supervisor has already moved on from has not reached EOF yet. The second kind clears when that pipe does reach EOF, because from then on nothing that process wrote is missing.
NotCaptured
No reader was attached. The tail says nothing about what the module wrote.