#[non_exhaustive]pub enum FaceError {
Io {
source: Error,
},
InputParse {
format: InputFormat,
message: String,
},
UnknownItemsPath {
path: String,
},
UnknownScorePath {
path: String,
},
AmbiguousDetection {
candidates: Vec<DetectionCandidate>,
numeric_fields: Vec<String>,
},
InvalidClusterId {
segment: usize,
reason: String,
},
UnknownAxis {
axis: String,
},
ConflictingFlags {
message: String,
},
Config {
path: PathBuf,
message: String,
},
Unsupported {
feature: String,
},
}Expand description
Library-level error returned by the face core surface.
Variants cover I/O failure, input parse failure, detection ambiguity,
cluster-id parse failure, flag conflicts, and configuration errors.
The enum is #[non_exhaustive] so adding a new variant is not a
breaking change.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Io
I/O failure reading or writing input.
InputParse
The input could not be parsed as the detected (or requested) format.
Fields
format: InputFormatFormat we were attempting to parse.
UnknownItemsPath
--items (or auto-detected items path) refers to a field that
does not exist in the input.
UnknownScorePath
The score path was supplied (or auto-detected) but no sampled item carried a numeric value at that path.
AmbiguousDetection
Auto-detection could not pick a single grouping field (§11.2).
The Display impl renders a multi-line hint listing the string
candidates and the available numeric fields so the user knows
to pass --by=FIELD or --score=FIELD. When both lists are
empty the message collapses to a single line.
Fields
candidates: Vec<DetectionCandidate>Candidate fields with their cardinality, ordered for display.
InvalidClusterId
A cluster id segment failed to parse.
Fields
UnknownAxis
A cluster id refers to an axis name not present in the current
envelope’s result.axes list.
ConflictingFlags
Two flags that cannot be combined were both supplied (§11.3).
Config
A configuration file could not be loaded or validated.
Unsupported
A requested capability is outside the current implementation, such as a future non-exhaustive strategy variant or invalid strategy parameters that cannot produce clusters.
Trait Implementations§
Source§impl Error for FaceError
impl Error for FaceError
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()