pub struct LineageQuery { /* private fields */ }Expand description
Lineage query builder.
Implementations§
Source§impl LineageQuery
impl LineageQuery
Sourcepub fn new(graph: Arc<LineageGraph>) -> Self
pub fn new(graph: Arc<LineageGraph>) -> Self
Create a new lineage query.
Sourcepub fn filter(self, filter: QueryFilter) -> Self
pub fn filter(self, filter: QueryFilter) -> Self
Add a filter.
Sourcepub fn ancestors(&self, node_id: &str) -> Result<Vec<LineageNode>>
pub fn ancestors(&self, node_id: &str) -> Result<Vec<LineageNode>>
Find all ancestors of a node.
Sourcepub fn descendants(&self, node_id: &str) -> Result<Vec<LineageNode>>
pub fn descendants(&self, node_id: &str) -> Result<Vec<LineageNode>>
Find all descendants of a node.
Sourcepub fn path(
&self,
from_id: &str,
to_id: &str,
) -> Result<Option<Vec<LineageNode>>>
pub fn path( &self, from_id: &str, to_id: &str, ) -> Result<Option<Vec<LineageNode>>>
Find path between two nodes.
Sourcepub fn find_nodes(&self) -> Result<Vec<LineageNode>>
pub fn find_nodes(&self) -> Result<Vec<LineageNode>>
Find all nodes matching a filter.
Sourcepub fn common_ancestors(&self, node_ids: &[String]) -> Result<Vec<LineageNode>>
pub fn common_ancestors(&self, node_ids: &[String]) -> Result<Vec<LineageNode>>
Find common ancestors of multiple nodes.
Auto Trait Implementations§
impl Freeze for LineageQuery
impl !RefUnwindSafe for LineageQuery
impl Send for LineageQuery
impl Sync for LineageQuery
impl Unpin for LineageQuery
impl UnsafeUnpin for LineageQuery
impl !UnwindSafe for LineageQuery
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