Skip to main content

FaceError

Enum FaceError 

Source
#[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
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
§

Io

I/O failure reading or writing input.

Fields

§source: Error

Underlying I/O error.

§

InputParse

The input could not be parsed as the detected (or requested) format.

Fields

§format: InputFormat

Format we were attempting to parse.

§message: String

Human-readable explanation.

§

UnknownItemsPath

--items (or auto-detected items path) refers to a field that does not exist in the input.

Fields

§path: String

The items path that could not be resolved.

§

UnknownScorePath

The score path was supplied (or auto-detected) but no sampled item carried a numeric value at that path.

Fields

§path: String

The score path that could not be resolved as numeric.

§

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.

§numeric_fields: Vec<String>

Top-level numeric field names (no cardinality), surfaced so the user can pick one with --score=FIELD.

§

InvalidClusterId

A cluster id segment failed to parse.

Fields

§segment: usize

Zero-based index of the offending segment.

§reason: String

Human-readable reason.

§

UnknownAxis

A cluster id refers to an axis name not present in the current envelope’s result.axes list.

Fields

§axis: String

The axis name that did not match any declared axis.

§

ConflictingFlags

Two flags that cannot be combined were both supplied (§11.3).

Fields

§message: String

Human-readable explanation naming the conflict.

§

Config

A configuration file could not be loaded or validated.

Fields

§path: PathBuf

Path to the offending config file.

§message: String

Human-readable explanation.

§

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.

Fields

§feature: String

Human-readable description of the missing capability.

Trait Implementations§

Source§

impl Debug for FaceError

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Display for FaceError

Source§

fn fmt(&self, __formatter: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Error for FaceError

Source§

fn source(&self) -> Option<&(dyn Error + 'static)>

Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§

fn description(&self) -> &str

👎Deprecated since 1.42.0:

use the Display impl or to_string()

1.0.0 · Source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0:

replaced by Error::source, which can support downcasting

Source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type-based access to context intended for error reports. Read more
Source§

impl From<Error> for FaceError

Source§

fn from(source: Error) -> Self

Converts to this type from the input type.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.