sinter-core 0.53.0

Typed code-graph model: nodes, edges, invariants
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
use crate::node::NodeId;

#[derive(Debug, Clone, PartialEq, Eq, thiserror::Error)]
pub enum GraphError {
    #[error("duplicate node id `{0}` (ids are case-sensitive; collision is an error, not a merge)")]
    DuplicateNode(NodeId),
    #[error("edge endpoint `{0}` does not exist in the graph")]
    MissingEndpoint(NodeId),
    #[error("node `{id}` has an empty {field}")]
    EmptyField { id: NodeId, field: &'static str },
    #[error("node `{id}` has an invalid span {start}..{end}")]
    InvalidSpan { id: NodeId, start: u64, end: u64 },
}