pub struct UnionFind<C: ?Sized = ()>(/* private fields */);Expand description
A disjoint-set data structure
Implementations§
Source§impl<C: ?Sized> UnionFind<C>
impl<C: ?Sized> UnionFind<C>
pub fn classes(&self) -> Classes<C> ⓘ
pub fn roots(&self) -> Roots<'_, C> ⓘ
pub fn parent(&self, key: ClassId<C>) -> Result<ClassId<C>, NoNode>
Trait Implementations§
Auto Trait Implementations§
impl<C> Freeze for UnionFind<C>
impl<C> RefUnwindSafe for UnionFind<C>
impl<C> Send for UnionFind<C>
impl<C> Sync for UnionFind<C>
impl<C> Unpin for UnionFind<C>
impl<C> UnsafeUnpin for UnionFind<C>
impl<C> UnwindSafe for UnionFind<C>
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