Skip to main content

uqa_graph/
types.rs

1//
2// Unified Query Algebra
3//
4// Copyright (c) 2023-2026 Cognica, Inc.
5//
6
7//! Graph-crate-local types. Vertex and Edge themselves live in
8//! [`uqa_core::types`] so any crate can name them without depending on
9//! `uqa-graph`.
10
11/// Edge traversal direction relative to a vertex.
12#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
13pub enum Direction {
14    /// Outgoing edges (`edge.source_id == vertex`).
15    Out,
16    /// Incoming edges (`edge.target_id == vertex`).
17    In,
18    /// Both directions, deduplicated.
19    Both,
20}