bijux-dag-core 0.4.1

Deterministic DAG kernel for graph parsing, validation, canonicalization, planning, and identity.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use crate::{Edge, EdgeKind, PortRef};
use serde::{Deserialize, Serialize};

pub type EdgeDependencyKind = EdgeKind;

#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)]
pub struct TypedEdge {
    pub from: PortRef,
    pub to: PortRef,
    pub dependency: EdgeDependencyKind,
}

impl From<Edge> for TypedEdge {
    fn from(value: Edge) -> Self {
        Self { from: value.from, to: value.to, dependency: value.kind }
    }
}