pub enum BatchError {
MissingAnswer {
row: usize,
question_id: String,
},
UnknownQuestion {
row: usize,
question_id: String,
},
KindMismatch {
row: usize,
question_id: String,
expected: QuestionKind,
got: QuestionKind,
},
CardinalityMismatch {
row: usize,
question_id: String,
expected: usize,
got: usize,
},
InvalidDistribution(usize, String, DistributionError),
AbstainedWithConformalSet {
row: usize,
question_id: String,
},
UnknownConformalLabel {
row: usize,
question_id: String,
label: String,
},
Arrow(ArrowError),
}Expand description
Why a row cannot be encoded into a batch under this schema.
Variants§
MissingAnswer
A row is missing an answer (even an abstention) for a declared question.
UnknownQuestion
A row answers a question the schema does not declare.
KindMismatch
The answer kind does not match the question kind.
CardinalityMismatch
The probability vector length does not equal the question cardinality.
Fields
InvalidDistribution(usize, String, DistributionError)
The distribution violates the producer tolerance (D5).
AbstainedWithConformalSet
An abstained answer carries a conformal set.
UnknownConformalLabel
A conformal set names a label outside the question’s label set.
Fields
Arrow(ArrowError)
Arrow rejected the assembled batch (internal invariant violation).
Trait Implementations§
Source§impl Debug for BatchError
impl Debug for BatchError
Source§impl Display for BatchError
impl Display for BatchError
Source§impl Error for BatchError
impl Error for BatchError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
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
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Auto Trait Implementations§
impl Freeze for BatchError
impl !RefUnwindSafe for BatchError
impl Send for BatchError
impl Sync for BatchError
impl Unpin for BatchError
impl UnsafeUnpin for BatchError
impl !UnwindSafe for BatchError
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more