pub enum Direction {
Outgoing,
Incoming,
Both,
}Expand description
Direction for graph traversal.
Specifies which edges to follow when traversing from a node.
Variants§
Outgoing
Follow outgoing edges (source -> target).
When traversing from node A, find nodes B where an edge A -> B exists.
Incoming
Follow incoming edges (target <- source).
When traversing from node A, find nodes B where an edge B -> A exists.
Both
Follow edges in both directions.
When traversing from node A, find nodes B where either A -> B or B -> A exists.
Implementations§
Source§impl Direction
impl Direction
Sourcepub const fn includes_outgoing(self) -> bool
pub const fn includes_outgoing(self) -> bool
Returns true if this direction includes outgoing edges.
Sourcepub const fn includes_incoming(self) -> bool
pub const fn includes_incoming(self) -> bool
Returns true if this direction includes incoming edges.
Trait Implementations§
impl Copy for Direction
impl Eq for Direction
impl StructuralPartialEq for Direction
Auto Trait Implementations§
impl Freeze for Direction
impl RefUnwindSafe for Direction
impl Send for Direction
impl Sync for Direction
impl Unpin for Direction
impl UnsafeUnpin for Direction
impl UnwindSafe for Direction
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