#[non_exhaustive]pub enum Direction {
Outgoing,
Incoming,
Both,
}Expand description
Direction a graph navigation expands along.
Used by both Reader::neighbors (single-hop
reverse-adjacency lookup) and Reader::walk (bounded
projection BFS). Outgoing follows source→target edges, Incoming follows
target→source edges, and Both follows either.
§Performance
Copying and comparing are O(1).
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Outgoing
Follow outgoing edges: the element plays the source role.
Incoming
Follow incoming edges: the element plays the target role.
Both
Follow outgoing edges first, then incoming edges.
Trait Implementations§
impl Copy for Direction
impl Eq for Direction
Source§impl Ord for Direction
impl Ord for Direction
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialOrd for Direction
impl PartialOrd 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