pub enum SearchTreeNode {
Root {
direction: Direction,
},
Branch {
incoming_edge: EdgeTraversal,
parent: Label,
direction: Direction,
},
}Expand description
A node in the search tree containing parent/child relationships and traversal data
Variants§
Implementations§
Source§impl SearchTreeNode
impl SearchTreeNode
Sourcepub fn new_child(
incoming_edge: EdgeTraversal,
parent: Label,
direction: Direction,
) -> Self
pub fn new_child( incoming_edge: EdgeTraversal, parent: Label, direction: Direction, ) -> Self
create a new child node from some trajectory (parent) -> [incoming_edge] -> (), for some direction in the network.
Sourcepub fn parent_label(&self) -> Option<&Label>
pub fn parent_label(&self) -> Option<&Label>
Retrieves the label of the parent node, if this node is not the root.
Sourcepub fn incoming_edge(&self) -> Option<&EdgeTraversal>
pub fn incoming_edge(&self) -> Option<&EdgeTraversal>
Retrieves the edge traversal that led to this node, if this node is not the root.
Sourcepub fn direction(&self) -> Direction
pub fn direction(&self) -> Direction
Retrieves the direction of the search tree this node belongs to.
Sourcepub fn traversal_cost(&self) -> Option<&TraversalCost>
pub fn traversal_cost(&self) -> Option<&TraversalCost>
Retrieves the cost of the edge traversal that led to this node, if this node is not the root.
Trait Implementations§
Source§impl Allocative for SearchTreeNode
impl Allocative for SearchTreeNode
Source§impl Clone for SearchTreeNode
impl Clone for SearchTreeNode
Source§fn clone(&self) -> SearchTreeNode
fn clone(&self) -> SearchTreeNode
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SearchTreeNode
impl Debug for SearchTreeNode
Auto Trait Implementations§
impl Freeze for SearchTreeNode
impl RefUnwindSafe for SearchTreeNode
impl Send for SearchTreeNode
impl Sync for SearchTreeNode
impl Unpin for SearchTreeNode
impl UnsafeUnpin for SearchTreeNode
impl UnwindSafe for SearchTreeNode
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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