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
// org id Robvmv7MKVA9nhridLr+yEw9Z+03849XIXfaIMnJ8jI= use super::change_id::*; use super::vertex::*; bitflags! { /// Possible flags of edges. #[derive(Serialize, Deserialize)] pub struct EdgeFlags: u8 { const BLOCK = 1; /// A pseudo-edge, computed when applying the change to /// restore connectivity, and/or mark conflicts. const PSEUDO = 4; /// An edge encoding file system hierarchy. const FOLDER = 16; /// A "reverse" edge (all edges in the graph have a reverse edge). const PARENT = 32; /// An edge whose target (if not also `PARENT`) or /// source (if also `PARENT`) is marked as deleted. const DELETED = 128; } } /// The target half of an edge in the repository graph. #[derive(Clone, Copy, Debug, PartialEq, PartialOrd, Eq, Ord, Hash)] #[doc(hidden)] pub struct Edge { /// Flags of this edge. pub flag: EdgeFlags, /// Target of this edge. pub dest: Position<ChangeId>, /// Change that introduced this edge (possibly as a /// pseudo-edge, i.e. not explicitly in the change, but /// computed from it). pub introduced_by: ChangeId, }