[−][src]Struct hashconsing::HConsign
The consign storing the actual hash consed elements as HConsed
s.
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]
F: FnMut(Acc, HConsed<T>) -> Acc,
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]
F: FnMut(Acc, HConsed<T>) -> Result<Acc, E>,
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]
T: Hash + Display,
Auto Trait Implementations
impl<T> Send for HConsign<T> where
T: Send + Sync,
T: Send + Sync,
impl<T> Sync for HConsign<T> where
T: Send + Sync,
T: Send + Sync,
Blanket Implementations
impl<T> From for T
[src]
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = !
🔬 This is a nightly-only experimental API. (
try_from
)The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,