pub enum ValidationError {
V1DuplicateName {
combinator: &'static str,
name: String,
},
V2ShapeMismatch {
expected: Vec<String>,
actual: Vec<String>,
},
V3UnresolvedNames {
reads: Vec<NameRead>,
},
V4InputShape {
strategy: StrategyName,
reason: String,
},
V6UnboundedDiscrete {
operator: &'static str,
cardinality: CardinalityClass,
},
V7ZipCardinality {
mode: ZipMode,
reason: String,
},
V8ContinuousRequirement {
reason: String,
},
V9UnionClassMismatch {
reason: String,
},
StrictWarning(ValidationWarning),
ContextRequired {
name: String,
references: Vec<String>,
},
PredicateContextRequired {
predicate: String,
references: Vec<String>,
},
SourceFailed {
name: String,
message: String,
},
}Expand description
V-axiom violation. Each variant carries enough context to produce a useful diagnostic at the call site.
Variants§
V1DuplicateName
V1 — cartesian or zip children share a name.
Fields
V2ShapeMismatch
V2 — union children disagree on tuple shape.
Fields
V3UnresolvedNames
V3 — a clause source or a filter predicate reads a name that
neither the comprehension binds where it is read nor the surface
it is evaluated on supplies (check_names).
V4InputShape
V4 — strategy applied to an input whose metadata-derived
IndexFn it cannot accept (per-strategy table in
check_strategy_input_shape). A strategy that selects from
the shape reads through the untruncated orders under it, and
V5 looks through one filter layer; nested filters are
rejected.
Fields
strategy: StrategyNameThe strategy applied.
V6UnboundedDiscrete
V6 — non-Lex order or Strict/Truncate zip applied to an
Unbounded discrete input.
Fields
cardinality: CardinalityClassThe unbounded input’s cardinality class.
V7ZipCardinality
V7 — zip cardinality contract violated. Three sub-cases: Strict-mode mismatch, mixed-class children, or any continuous child.
V8ContinuousRequirement
V8 — continuous source requires explicit sampling OR source declares a non-integrable measure.
V9UnionClassMismatch
V9 — union children include a continuous or mixed-class child.
StrictWarning(ValidationWarning)
Strict mode (comprehension_forms.md §5.8): a degenerate composition the permissive mode only warns about.
ContextRequired
A source that needs a scope, on the scope-less surfaces (comprehension_forms.md §9.5.2, §10.7.0): a coordinate stream binds no names, the traversal does.
PredicateContextRequired
A filter whose predicate names what its tuples do not bind, on the scope-less surfaces: a traversal resolves such a name in the scope it opens in, and a coordinate stream has none.
Fields
SourceFailed
A context-free source that could not be evaluated, on the scope-less surfaces. Its only evaluation is the compile’s, in the empty scope, so its failure is the comprehension’s error rather than a clause that dispenses nothing.
Trait Implementations§
Source§impl Clone for ValidationError
impl Clone for ValidationError
Source§impl Debug for ValidationError
impl Debug for ValidationError
Source§impl Display for ValidationError
impl Display for ValidationError
Source§impl Error for ValidationError
impl Error for ValidationError
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()
Source§impl PartialEq for ValidationError
impl PartialEq for ValidationError
impl StructuralPartialEq for ValidationError
Auto Trait Implementations§
impl Freeze for ValidationError
impl RefUnwindSafe for ValidationError
impl Send for ValidationError
impl Sync for ValidationError
impl Unpin for ValidationError
impl UnsafeUnpin for ValidationError
impl UnwindSafe for ValidationError
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<T> ToCompactString for Twhere
T: Display,
impl<T> ToCompactString for Twhere
T: Display,
Source§fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
ToCompactString::to_compact_string() Read moreSource§fn to_compact_string(&self) -> CompactString
fn to_compact_string(&self) -> CompactString
CompactString. Read more