#[non_exhaustive]pub enum Error {
Show 14 variants
RocksDb(Error),
Serde(Error),
Core(Error),
MissingColumnFamily(&'static str),
CorruptBytes {
cf: &'static str,
expected: usize,
actual: usize,
},
NodeNotFound(NodeId),
EdgeNotFound(EdgeId),
UnindexableValue {
property: String,
kind: &'static str,
},
ConstraintNameConflict {
name: String,
},
ConstraintNotFound {
name: String,
},
ConstraintArity {
kind: String,
details: String,
},
ConstraintViolation {
name: String,
kind: String,
label: String,
property: String,
details: String,
},
IndexInUse {
constraint: String,
},
Unsupported(String),
}Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
RocksDb(Error)
Serde(Error)
Core(Error)
MissingColumnFamily(&'static str)
CorruptBytes
NodeNotFound(NodeId)
EdgeNotFound(EdgeId)
UnindexableValue
ConstraintNameConflict
Two constraint declarations collided on the same name with
incompatible specs. Raised by create_property_constraint when
IF NOT EXISTS is absent and the name is already taken by a
different (label, property, kind). The resolver is “name wins”
so the caller can’t transparently re-declare under a different
shape — they have to DROP first.
ConstraintNotFound
DROP CONSTRAINT targeted a name that isn’t registered and the
IF EXISTS escape wasn’t supplied. Callers wrap this for
user-facing surfaces.
ConstraintArity
Property-arity mismatch: the caller passed a property list
whose length is wrong for the constraint kind — e.g. two
properties to a UNIQUE (which accepts exactly one) or an
empty list to any kind. Surfaced so the Cypher surface can
give a clear error instead of silently clipping the list.
ConstraintViolation
A write would put the store into a state that violates a
registered constraint. The kind field carries the constraint
type (e.g. UNIQUE, NOT NULL, IS :: STRING) so callers can
format a clear message. kind is String rather than
&'static str because PropertyConstraintKind::PropertyType
carries a runtime-selected type name.
IndexInUse
DROP INDEX targeted a property index that backs an active
UNIQUE or NODE KEY constraint. Without this guard, dropping
the backing index silently defeats the constraint — the
enforcement path seeks through the same index, so a missing
index collapses the uniqueness check to “always passes”. The
caller must DROP CONSTRAINT first.
Unsupported(String)
A storage operation that the backing engine doesn’t support reached the trait. Lets default trait impls (e.g. the trigger-registry methods) return a clear error without forcing every backend to implement every optional surface.
Trait Implementations§
Source§impl Error for Error
impl Error for Error
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()