pub enum NestedErrorClass {
Show 22 variants
ConstraintVerificationFailed,
ArgumentError,
EntityNotFound,
ProcedureError,
SyntaxError,
SemanticError,
UnsupportedAdministrationCommand,
WriteOnReadOnlyAccessDatabase,
DatabaseNotFound,
TransactionError,
ConstraintAlreadyExists,
EquivalentConstraintAlreadyExists,
ConstraintConflict,
ConstraintNotFound,
DependentConstraintManagedIndividually,
DuplicatedIndexName,
IndexAlreadyExists,
EquivalentSchemaRuleAlreadyExists,
IncompatibleGraphTypeDependence,
IndexDoesNotExist,
SystemDatabaseRequired,
ElementIdUnexpectedFormat,
}Expand description
The closed vocabulary of that scan: one variant per class name the
engine’s CE formatters (relate_core::ce_messages,
ADR-0116 §9/ADR-0117 §6) and the legacy constraint classes embed. The
token parsing stays at the scan’s one boundary; every consumer matches
the typed variant.
Variants§
ConstraintVerificationFailed
The legacy constraint family (ConstraintValidationFailed: /
ConstraintVerificationFailed: tokens, anywhere in the payload).
ArgumentError
A DDL argument-value rejection (ArgumentError:).
EntityNotFound
A missing node or relationship (EntityNotFound:).
ProcedureError
A registered procedure’s own failure (ProcedureError:).
SyntaxError
A rejected statement (SyntaxError:).
SemanticError
A semantic rejection (SemanticError:).
UnsupportedAdministrationCommand
An unsupported administration command (ADR-0116 §9).
WriteOnReadOnlyAccessDatabase
A write against the read-only system_ontologies namespace
(ADR-0116 §9).
DatabaseNotFound
An unknown database (DatabaseNotFound:).
TransactionError
A transaction-state failure (TransactionError:).
ConstraintAlreadyExists
A constraint with the same name already exists (22N67).
EquivalentConstraintAlreadyExists
An equivalent constraint already exists (22N65).
ConstraintConflict
A conflicting constraint already exists (22N66).
ConstraintNotFound
A DROP CONSTRAINT whose name does not exist (50N12).
DependentConstraintManagedIndividually
A DROP CONSTRAINT of a dependent constraint (50N12).
DuplicatedIndexName
An index with the same name already exists (22N71).
IndexAlreadyExists
An index with the same name already exists (22N71).
EquivalentSchemaRuleAlreadyExists
An equivalent index already exists (22N70).
IncompatibleGraphTypeDependence
A constraint’s graph-type dependence is incompatible (22NB2).
IndexDoesNotExist
The index a query names does not exist (22N69).
SystemDatabaseRequired
An administration command that needs the system database (51N28).
ElementIdUnexpectedFormat
An element id whose format cannot be resolved (50N00).
Implementations§
Source§impl NestedErrorClass
impl NestedErrorClass
Sourcepub fn as_str(self) -> &'static str
pub fn as_str(self) -> &'static str
The one string spelling of the class — the <Class>: token
the engine embeds and the bindings report. Generated from
the variant name, so the spelling is single-sourced.
use relate_error::{nested_error_class, NestedErrorClass};
assert_eq!(
NestedErrorClass::ConstraintVerificationFailed.as_str(),
"ConstraintVerificationFailed"
);
assert_eq!(
nested_error_class("ArgumentError: bad options"),
Some(NestedErrorClass::ArgumentError)
);
assert_eq!(NestedErrorClass::ArgumentError.as_str(), "ArgumentError");Source§impl NestedErrorClass
impl NestedErrorClass
Sourcepub fn binding_class(self) -> Option<&'static str>
pub fn binding_class(self) -> Option<&'static str>
The openCypher class the language bindings report for this token, or
None for a schema/DDL condition token — those are classified for
their GQLSTATUS while the bindings keep the class they had before
the condition had a token (a Syntax payload’s SyntaxError, a
Semantic/Execution payload’s SemanticError).
Trait Implementations§
Source§impl Clone for NestedErrorClass
impl Clone for NestedErrorClass
impl Copy for NestedErrorClass
Source§impl Debug for NestedErrorClass
impl Debug for NestedErrorClass
impl Eq for NestedErrorClass
Source§impl PartialEq for NestedErrorClass
impl PartialEq for NestedErrorClass
impl StructuralPartialEq for NestedErrorClass
Auto Trait Implementations§
impl Forget for NestedErrorClass
impl Freeze for NestedErrorClass
impl Move for NestedErrorClass
impl RefUnwindSafe for NestedErrorClass
impl Send for NestedErrorClass
impl Sync for NestedErrorClass
impl Unpin for NestedErrorClass
impl UnsafeUnpin for NestedErrorClass
impl UnwindSafe for NestedErrorClass
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<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
key and return true if they are equal.