#[non_exhaustive]pub enum ValidationError {
Show 27 variants
DuplicateName {
name: Box<str>,
},
DuplicateTypeName {
name: ScopedTypeName,
},
DuplicateLifecycle {
lifecycle: Lifecycle,
},
IdentifierError {
error: IdentifierError,
},
UnnamedColumn {
column: RawColumnName,
},
TypeHasIncorrectOrdering {
type_name: RawScopedTypeNameV9,
ref_: AlgebraicTypeRef,
bad_type: PrettyAlgebraicType,
},
ColumnNotFound {
table: RawIdentifier,
def: RawIdentifier,
column: ColId,
},
ColumnDefMalformed {
column: RawColumnName,
ty: PrettyAlgebraicType,
pos: ColId,
product_type: PrettyAlgebraicType,
},
RepeatedPrimaryKey {
table: RawIdentifier,
},
OneAutoInc {
column: RawColumnName,
},
HashIndexUnsupported {
index: RawIdentifier,
},
UniqueConstraintWithoutIndex {
constraint: Box<str>,
columns: ColSet,
},
DirectIndexOnBadType {
index: RawIdentifier,
column: RawIdentifier,
ty: PrettyAlgebraicType,
},
DuplicateColumns {
def: RawIdentifier,
columns: ColList,
},
InvalidSequenceColumnType {
sequence: RawIdentifier,
column: RawColumnName,
column_type: PrettyAlgebraicType,
},
InvalidSequenceRange {
sequence: RawIdentifier,
min_value: Option<i128>,
start: Option<i128>,
max_value: Option<i128>,
},
InvalidProductTypeRef {
table: RawIdentifier,
ref_: AlgebraicTypeRef,
},
InvalidTypeRef {
type_name: RawScopedTypeNameV9,
ref_: AlgebraicTypeRef,
},
ScheduledIncorrectColumns {
table: RawIdentifier,
columns: ProductType,
},
ClientCodegenError {
location: TypeLocation<'static>,
error: ClientCodegenError,
},
MissingTypeDef {
ref_: AlgebraicTypeRef,
ty: PrettyAlgebraicType,
},
MissingPrimaryKeyUniqueConstraint {
column: RawColumnName,
},
TableTypeNameMismatch {
table: Identifier,
},
MissingScheduledReducer {
schedule: Box<str>,
reducer: Identifier,
},
IncorrectScheduledReducerParams {
reducer: RawIdentifier,
expected: PrettyAlgebraicType,
actual: PrettyAlgebraicType,
},
TableNameReserved {
table: Identifier,
},
InvalidRowLevelQuery {
sql: String,
error: String,
},
}Expand description
A single validation error.
Many variants of this enum store RawIdentifiers rather than Identifiers.
This is because we want to support reporting errors about module entities with invalid names.
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.
DuplicateName
DuplicateTypeName
Fields
§
name: ScopedTypeNameDuplicateLifecycle
IdentifierError
Fields
§
error: IdentifierErrorUnnamedColumn
Fields
§
column: RawColumnNameTypeHasIncorrectOrdering
Fields
§
type_name: RawScopedTypeNameV9§
ref_: AlgebraicTypeRef§
bad_type: PrettyAlgebraicTypeCould be a sum or product.
ColumnNotFound
ColumnDefMalformed
RepeatedPrimaryKey
Fields
§
table: RawIdentifierOneAutoInc
Fields
§
column: RawColumnNameHashIndexUnsupported
Fields
§
index: RawIdentifierUniqueConstraintWithoutIndex
DirectIndexOnBadType
DuplicateColumns
InvalidSequenceColumnType
InvalidSequenceRange
InvalidProductTypeRef
InvalidTypeRef
ScheduledIncorrectColumns
ClientCodegenError
MissingTypeDef
MissingPrimaryKeyUniqueConstraint
Fields
§
column: RawColumnNameTableTypeNameMismatch
Fields
§
table: IdentifierMissingScheduledReducer
IncorrectScheduledReducerParams
TableNameReserved
Fields
§
table: IdentifierInvalidRowLevelQuery
Trait Implementations§
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)>
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()
Source§impl Ord for ValidationError
impl Ord for ValidationError
Source§fn cmp(&self, other: &ValidationError) -> Ordering
fn cmp(&self, other: &ValidationError) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for ValidationError
impl PartialEq for ValidationError
Source§impl PartialOrd for ValidationError
impl PartialOrd for ValidationError
impl Eq 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 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
Mutably borrows from an owned value. Read more
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.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>
Converts
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>
Converts
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 more