[][src]Struct hashconsing::HConsign

pub struct HConsign<T: Hash + Eq + Clone> { /* fields omitted */ }

The consign storing the actual hash consed elements as HConseds.

Methods

impl<T: Hash + Eq + Clone> HConsign<T>[src]

pub fn empty() -> Self[src]

Creates an empty consign.

pub fn with_capacity(capacity: usize) -> Self[src]

Creates an empty consign with a capacity.

pub fn fold<Acc, F>(&self, init: Acc, f: F) -> Acc where
    F: FnMut(Acc, HConsed<T>) -> Acc, 
[src]

Fold on the elements stored in the consign.

pub fn fold_res<Acc, F, E>(&self, init: Acc, f: F) -> Result<Acc, E> where
    F: FnMut(Acc, HConsed<T>) -> Result<Acc, E>, 
[src]

Fold on the elements stored in the consign, result version.

pub fn len(&self) -> usize[src]

The number of elements stored, mostly for testing.

pub fn is_empty(&self) -> bool[src]

True if the consign is empty.

Trait Implementations

impl<'a, T: Hash + Eq + Clone> HashConsign<T> for &'a mut HConsign<T>[src]

fn mk_is_new(self, elm: T) -> (HConsed<T>, bool)[src]

Hash conses something and returns the hash consed version.

fn mk(self, elm: T) -> HConsed<T>[src]

Creates a HConsed element.

impl<T: Hash + Eq + Clone> Display for HConsign<T> where
    T: Hash + Display
[src]

Auto Trait Implementations

impl<T> Send for HConsign<T> where
    T: Send + Sync

impl<T> Sync for HConsign<T> where
    T: Send + Sync

Blanket Implementations

impl<T> From for T[src]

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom for T where
    U: Into<T>, 
[src]

type Error = !

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.