A union find datastructure. Note that this implementation clones elements a lot. Generally, you should use the datastructure with small, preferably Copyable types, like integers. However, arbitrary Clone+PartialEq types are possible.
Copy
Clone
PartialEq