Struct hash_cons::single_threaded::HCTable
source · pub struct HCTable<T>where
T: Hash + Eq,{ /* private fields */ }Expand description
HCTable
A table structure for efficiently managing Hc<T> instances.
This struct hides the underlying table and its reference count management.
This structure utilizes a HashMap to store Hc<T> instances, offering
quick retrieval and management capabilities.
Type Parameters
T- The type of values managed by theHc<T>instances within this table.
Fields
table: HashMap - The underlying data structure storingHc<T>instances.
Implementations§
source§impl<T> HCTable<T>where
T: Hash + Eq,
impl<T> HCTable<T>where T: Hash + Eq,
sourcepub fn hashcons(&self, value: T) -> Hc<T>
pub fn hashcons(&self, value: T) -> Hc<T>
Simplifies object retrieval or creation with an intuitive interface.
Parameters
value: The value to be managed.
Returns
A Hc<T> instance corresponding to the given value.
Auto Trait Implementations§
impl<T> !RefUnwindSafe for HCTable<T>
impl<T> !Send for HCTable<T>
impl<T> !Sync for HCTable<T>
impl<T> Unpin for HCTable<T>
impl<T> !UnwindSafe for HCTable<T>
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