pub enum GraphError {
Show 18 variants
KeyNotFound {
key: String,
},
DuplicateKey {
key: String,
},
Io(Error),
Corrupt {
detail: String,
},
RuleInvalid {
detail: String,
},
RuleOwned {
detail: String,
},
RuleNotFound {
name: String,
},
QueryError {
detail: String,
},
IngestError {
detail: String,
},
ReadOnly,
CommitOutOfRange {
commit: u64,
total: u64,
floor: u64,
},
ViewPropReadOnly {
view_name: String,
},
CasConflict {
key: String,
expected: u64,
actual: u64,
},
MaskedReadOnly,
RoleWriteDenied {
reason: String,
},
Busy {
holder: Option<u32>,
},
NamespaceImmutable {
key: String,
from: String,
to: String,
},
CrossNamespace {
src: String,
src_ns: String,
dst: String,
dst_ns: String,
},
}Variants§
KeyNotFound
DuplicateKey
Io(Error)
Corrupt
RuleInvalid
RuleOwned
RuleNotFound
QueryError
IngestError
ReadOnly
Attempted mutation on a read-only as-of instance.
CommitOutOfRange
Requested commit index is outside the retained range.
The valid range is floor..total: floor is the oldest commit still
reachable (the WAL horizon floor, 0 when nothing has been pruned) and
total is the exclusive upper bound. A floor > 0 means older events
were pruned and are not retained; retrying at commit 0 will fail too.
ViewPropReadOnly
Attempted to write to a view-managed property.
CasConflict
A compare-and-set precondition was not satisfied.
expected is the commit seq the caller expected to see; actual is the
commit seq recorded in the last-change map (or u64::MAX for
NodeAbsent conflicts where the node unexpectedly exists).
MaskedReadOnly
Write statement submitted to a read-only masked query path.
Returned by [GraphDb::query_masked] when the Cypher input is a write
statement (CREATE / MERGE / MATCH…SET / DELETE). The HTTP layer maps
this to 400 Bad Request with body {"error":"masked queries are read-only"}.
RoleWriteDenied
A role-scoped write was denied by the authz decision table (§3, §4.3).
reason carries the verbatim §4.3 error body text (without the JSON
envelope). The HTTP layer maps this to 403 with body
{"error": "<reason>"}. Five reason patterns are defined by the spec:
"role-bound token: label '<L>' not in write scope (<scope_field>)""role-bound token: target node not visible"(hidden ≡ absent)"role-bound token: edge endpoint not visible""role-bound token: edge type '<T>' not in write scope (<scope_field>)""role-bound token: this endpoint is not permitted"
Busy
The store’s advisory cross-process write lock could not be taken within the caller’s wait budget: another process is writing.
Nothing was written and in-memory state is unchanged, so retrying later is always safe. Readers never see this error — reads do not take the lock.
holder is the process id of the lock holder when the platform makes it
cheaply knowable, and None otherwise. It is a diagnostic hint only;
never branch on it.
NamespaceImmutable
A write tried to change a node’s namespace.
A namespace is a tenancy boundary, set when the node is inserted and fixed for its lifetime: moving a node between tenants is a deletion from one and a creation in the other, and saying so is more honest than a property edit that silently re-homes every edge the node carries.
CrossNamespace
A user-written edge would join two nodes in different namespaces.
Only a global rule (one with no namespace) may derive an edge
across the boundary; a namespaced rule sees one namespace’s nodes only,
so its edges are intra-namespace by construction.
Trait Implementations§
Source§impl Debug for GraphError
impl Debug for GraphError
Source§impl Display for GraphError
impl Display for GraphError
Source§impl Error for GraphError
impl Error for GraphError
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 From<Error> for GraphError
impl From<Error> for GraphError
Source§fn from(e: Error) -> GraphError
fn from(e: Error) -> GraphError
Auto Trait Implementations§
impl !RefUnwindSafe for GraphError
impl !UnwindSafe for GraphError
impl Freeze for GraphError
impl Send for GraphError
impl Sync for GraphError
impl Unpin for GraphError
impl UnsafeUnpin for GraphError
Blanket Implementations§
Source§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
Source§type ArchivedMetadata = ()
type ArchivedMetadata = ()
Source§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
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> LayoutRaw for T
impl<T> LayoutRaw for T
Source§fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
Source§impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
Source§unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
Source§fn resolve_niched(out: Place<NichedOption<T, N1>>)
fn resolve_niched(out: Place<NichedOption<T, N1>>)
out indicating that a T is niched.