#[non_exhaustive]pub enum Error {
Read {
path: PathBuf,
detail: String,
},
Compose {
path: PathBuf,
diagnostics: Vec<String>,
},
Codegen {
path: PathBuf,
detail: String,
},
Write {
path: PathBuf,
detail: String,
},
NoOutDir,
Axis {
flag: &'static str,
value: String,
detail: String,
},
}Expand description
What went wrong.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Read
A unit could not be read.
Compose
A unit did not compose: it holds an error the front end reported.
Every diagnostic is carried, not just the first — a build that reports one defect per run costs a round trip per defect.
Fields
Codegen
The model composed and the emitter refused a type in it.
Write
The generated module could not be written.
NoOutDir
OUT_DIR was not set and no output directory was chosen.
Cargo sets OUT_DIR for a build script. Reaching this means the
caller is not one, and has to say where the output goes.
Axis
A value given to Config::axis is not one its axis recognises.
axis is infallible — it only appends to a list — so this is
where a typo in the value string surfaces, the same way an
unknown axis value surfaces at zerodds-idlc generate’s command
line, just later: there is no command line here to refuse it at.
Trait Implementations§
Source§impl Error for Error
impl Error for Error
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()