pub struct LineageGraph { /* private fields */ }Expand description
Lineage graph.
Implementations§
Source§impl LineageGraph
impl LineageGraph
Sourcepub fn add_node(&self, node: LineageNode) -> Result<String>
pub fn add_node(&self, node: LineageNode) -> Result<String>
Add a node to the graph.
Sourcepub fn add_edge(&self, edge: LineageEdge) -> Result<String>
pub fn add_edge(&self, edge: LineageEdge) -> Result<String>
Add an edge to the graph.
Sourcepub fn get_node(&self, node_id: &str) -> Option<LineageNode>
pub fn get_node(&self, node_id: &str) -> Option<LineageNode>
Get a node by ID.
Sourcepub fn get_nodes_by_entity(&self, entity_id: &str) -> Vec<LineageNode>
pub fn get_nodes_by_entity(&self, entity_id: &str) -> Vec<LineageNode>
Get nodes by entity ID.
Sourcepub fn get_upstream(&self, node_id: &str) -> Result<Vec<LineageNode>>
pub fn get_upstream(&self, node_id: &str) -> Result<Vec<LineageNode>>
Get upstream nodes (dependencies).
Sourcepub fn get_downstream(&self, node_id: &str) -> Result<Vec<LineageNode>>
pub fn get_downstream(&self, node_id: &str) -> Result<Vec<LineageNode>>
Get downstream nodes (dependents).
Sourcepub fn get_ancestors(&self, node_id: &str) -> Result<Vec<LineageNode>>
pub fn get_ancestors(&self, node_id: &str) -> Result<Vec<LineageNode>>
Get all ancestors (recursive upstream).
Sourcepub fn get_descendants(&self, node_id: &str) -> Result<Vec<LineageNode>>
pub fn get_descendants(&self, node_id: &str) -> Result<Vec<LineageNode>>
Get all descendants (recursive downstream).
Sourcepub fn record_event(&self, event: LineageEvent) -> Result<()>
pub fn record_event(&self, event: LineageEvent) -> Result<()>
Record a lineage event.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for LineageGraph
impl !RefUnwindSafe for LineageGraph
impl Send for LineageGraph
impl Sync for LineageGraph
impl Unpin for LineageGraph
impl UnsafeUnpin for LineageGraph
impl !UnwindSafe for LineageGraph
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more