pub enum CoreError {
NodeNotFound(u64),
EdgeNotFound(u64),
DuplicateTitle(String),
InvalidWeight(f32),
Io(Error),
Json(Error),
Locked,
Backend(String),
PreparedTransactionPending(Vec<String>),
}Expand description
Errors from the graph engine, its indexes and the dump format.
See the module docs for how it relates to drevo’s DrevoError.
Variants§
NodeNotFound(u64)
The requested node was not found.
EdgeNotFound(u64)
The requested edge was not found.
DuplicateTitle(String)
A node with the given title already exists (title uniqueness).
InvalidWeight(f32)
An edge weight failed validation: it is not a finite f32
(NaN, +Inf, or -Inf are rejected at edge create / update). Edge
derives PartialEq, which f32::NAN != f32::NAN would break.
Io(Error)
An I/O error occurred (e.g. reading or writing a dump file).
Json(Error)
A JSON (de)serialization error occurred while encoding a property value or a dump record.
Locked
The durable store is already open by another handle or process.
NativeGraph::open_durable
takes an exclusive advisory lock on the store’s lock sidecar; a second
open of the same path fails with this rather than letting two writers
interleave WAL appends and corrupt the log. Maps to drevo’s
DrevoError::Locked. The advisory lock is released when the
owning process dies, so a crash never leaves a stale lock behind.
Backend(String)
A failure from a layer built on top — a vector-index error, a transaction-state error — that has no structured variant here. Carries the lower layer’s rendered message so nothing is lost on the wire, even though the structured variant is not preserved.
PreparedTransactionPending(Vec<String>)
Two-phase commit: a transaction is prepared and every other write is refused until it is resolved (the prepared fence). Retryable; carries the pending global transaction ids.
Trait Implementations§
Source§impl Error for CoreError
impl Error for CoreError
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()