pub trait CtxEq<V1: ?Sized, V2: ?Sized> {
    // Required method
    fn ctx_eq(&self, a: &V1, b: &V2, uf: &mut UnionFind) -> bool;
}
Expand description

Trait that allows for equality comparison given some external context.

Note that this trait is implemented by the context, rather than the item type, for somewhat complex lifetime reasons (lack of GATs to allow for<'ctx> Ctx<'ctx>-like associated types in traits on the value type).

Furthermore, the ctx_eq method includes a UnionFind parameter, because in practice we require this and a borrow to it cannot be included in the context type without GATs (similarly to above).

Required Methods§

source

fn ctx_eq(&self, a: &V1, b: &V2, uf: &mut UnionFind) -> bool

Determine whether a and b are equal, given the context in self and the union-find data structure uf.

Implementors§