pub trait TreeIsomorphism<T> {
// Required method
fn is_isomorphic_to(&self, other: &Self) -> bool;
}
Expand description
Extension trait adding isomorphism checking on trees.
Required Methods§
Sourcefn is_isomorphic_to(&self, other: &Self) -> bool
fn is_isomorphic_to(&self, other: &Self) -> bool
Is the tree isomorphic to another?
The standard data structure for trees based on pointers has only one notion of “sameness” that makes sense, but for vector-backed trees with node IDs, trees can be isomorphic (logically the same) without having underlying data that is equal. This methods checks for logical sameness.
Note that the isomorphism check ignores orphaned nodes, since those are logically deleted.
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.