pub struct TreeNode<T: PathTreeTypes> {
pub id: T::NodeId,
pub parent: Option<HalfEdgeOwned<T>>,
pub node: Node<T>,
}
Expand description
Immutable node in the tree.
Fields§
§id: T::NodeId
Identifier for direct lookup.
parent: Option<HalfEdgeOwned<T>>
Link to the parent node.
Must be None
for the root node and Some
for all other nodes.
node: Node<T>
The actual content of this node.
Trait Implementations§
Auto Trait Implementations§
impl<T> Freeze for TreeNode<T>where
<T as PathTreeTypes>::NodeId: Freeze,
<T as PathTreeTypes>::PathSegmentOwned: Freeze,
<T as PathTreeTypes>::InnerValue: Freeze,
<T as PathTreeTypes>::LeafValue: Freeze,
impl<T> RefUnwindSafe for TreeNode<T>where
<T as PathTreeTypes>::NodeId: RefUnwindSafe,
<T as PathTreeTypes>::PathSegmentOwned: RefUnwindSafe,
<T as PathTreeTypes>::InnerValue: RefUnwindSafe,
<T as PathTreeTypes>::LeafValue: RefUnwindSafe,
impl<T> Send for TreeNode<T>where
<T as PathTreeTypes>::NodeId: Send + Sync,
<T as PathTreeTypes>::PathSegmentOwned: Send + Sync,
<T as PathTreeTypes>::InnerValue: Send,
<T as PathTreeTypes>::LeafValue: Send,
impl<T> Sync for TreeNode<T>where
<T as PathTreeTypes>::NodeId: Sync + Send,
<T as PathTreeTypes>::PathSegmentOwned: Sync + Send,
<T as PathTreeTypes>::InnerValue: Sync,
<T as PathTreeTypes>::LeafValue: Sync,
impl<T> Unpin for TreeNode<T>where
<T as PathTreeTypes>::NodeId: Unpin,
<T as PathTreeTypes>::PathSegmentOwned: Unpin,
<T as PathTreeTypes>::InnerValue: Unpin,
<T as PathTreeTypes>::LeafValue: Unpin,
impl<T> UnwindSafe for TreeNode<T>where
<T as PathTreeTypes>::NodeId: UnwindSafe + RefUnwindSafe,
<T as PathTreeTypes>::PathSegmentOwned: UnwindSafe + RefUnwindSafe,
<T as PathTreeTypes>::InnerValue: UnwindSafe,
<T as PathTreeTypes>::LeafValue: UnwindSafe,
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