pub enum NestedErrorClass {
ConstraintVerificationFailed,
ArgumentError,
EntityNotFound,
ProcedureError,
SyntaxError,
SemanticError,
UnsupportedAdministrationCommand,
WriteOnReadOnlyAccessDatabase,
DatabaseNotFound,
TransactionError,
}Expand description
The openCypher error class nested in a still-stringly Syntax/
Semantic/Execution payload: the legacy constraint-class tokens
first, then a leading <Class>: name token. nested_error_class
returns None when the payload carries no recognized class — the
caller’s variant-level class is then the answer.
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:).
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. Derived from the enum, 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");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.