pub trait Node {
// Required methods
fn new_parent(self, right: Self) -> Self;
fn new_parent_from_single(self) -> Self;
}
Expand description
A trait representing a node in a binary tree.
Required Methods§
Sourcefn new_parent(self, right: Self) -> Self
fn new_parent(self, right: Self) -> Self
Sourcefn new_parent_from_single(self) -> Self
fn new_parent_from_single(self) -> Self
Creates a new parent node from a single child node
§Return
The new parent node with the child node as self
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.