pub struct Node<T, Q>{
pub value: T,
pub parent: Q,
}
Expand description
A node in a Tree. Contains the key of its parent node (which can potentially be its own key), as well as a value.
Fields§
§value: T
The value contained in the node.
parent: Q
The key of the parent node.
Implementations§
Trait Implementations§
Source§impl<'de, T, Q> Deserialize<'de> for Node<T, Q>
impl<'de, T, Q> Deserialize<'de> for Node<T, Q>
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl<T, Q> Eq for Node<T, Q>
impl<T, Q> StructuralPartialEq for Node<T, Q>
Auto Trait Implementations§
impl<T, Q> Freeze for Node<T, Q>
impl<T, Q> RefUnwindSafe for Node<T, Q>where
T: RefUnwindSafe,
Q: RefUnwindSafe,
impl<T, Q> Send for Node<T, Q>
impl<T, Q> Sync for Node<T, Q>
impl<T, Q> Unpin for Node<T, Q>
impl<T, Q> UnwindSafe for Node<T, Q>where
T: UnwindSafe,
Q: 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