pub enum Event {
Resolved {
program: OsString,
path: Option<PathBuf>,
kind: ProgramKind,
},
Starting {
plan: Plan,
},
Finished {
code: u8,
},
Warning(String),
Note(String),
Error(String),
Phase {
name: &'static str,
micros: u128,
detail: String,
},
Notes {
plugin: String,
notes: Vec<String>,
},
PluginMessage {
level: u32,
text: String,
},
}Expand description
Something that happened while running one command.
Variants§
Resolved
The program was resolved to something concrete.
Fields
kind: ProgramKindHow it will be started.
Starting
About to start it.
Finished
It finished, with this exit code.
Warning(String)
Something the person should know even without asking for detail.
Note(String)
Detail for someone tracing the run.
Error(String)
Something went wrong, which did not stop the run either.
Phase
One phase of the run finished, with how long it took.
The engine measures its own phases so that a caller’s trace can attribute the time – which is where a run spends everything that is not the backend’s own runtime.
Fields
Notes
The decision’s notes, for whoever shows them: ties, and how to override the choice.
PluginMessage
The plugin said something while it was being called.
The level is the contract’s number, and the text is exactly what the plugin wrote: how to show it (an id, a colour, a destination) is the caller’s business.