pub trait HashConsign<T: Hash>: Sized {
    fn mk_is_new(self, elm: T) -> (HConsed<T>, bool);

    fn mk(self, elm: T) -> HConsed<T> { ... }
}
Expand description

HConsed element creation.

Implemented via a trait to be able to extend RwLock for lazy static consigns.

Required Methods

Hashconses something and returns the hash consed version.

Returns true iff the element

  • was not in the consign at all, or
  • was in the consign but it is not referenced (weak ref cannot be upgraded.)

Provided Methods

Creates a HConsed element.

Implementations on Foreign Types

If the element is already in the consign, only read access will be requested.

Implementors