1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
//! The outcome of a single edge removal.
//!
//! `remove_edge` returns `bool` across every layer of the graph stack, and that
//! one bit conflates four genuinely different outcomes:
//!
//! 1. the edge was removed;
//! 2. the edge was not there to begin with — benign, and callers rely on it;
//! 3. the write-ahead log refused the remove, so the store was left untouched
//! and durability is broken;
//! 4. the edge id was live in the index but missing from its source shard — an
//! index desynchronisation that can leave a dangling incoming half-edge.
//!
//! Cases 2 and 3/4 are indistinguishable from the outside *after* the call: in
//! both the edge is absent from the index and from the source shard. Only the
//! layer performing the removal can tell them apart, which is why the internal
//! path reports this enum instead of re-deriving the answer afterwards.
//!
//! The public `remove_edge -> bool` API is unchanged and keeps folding this
//! down to `matches!(.., Removed)`; this type stays `pub(crate)` so the folding
//! happens at the crate boundary.
/// What a single `remove_edge` attempt actually did.
pub