[][src]Struct hayami_im_rc::SymbolTable

pub struct SymbolTable<K: Hash + Eq, V, S: BuildHasher = RandomState> { /* fields omitted */ }

A symbol table implementation supporting snapshots, i.e. an O(1) cloning operation.

Faster than the implementation in snap, at the cost of not implementing Send + Sync.

Implementations

impl<K: Hash + Eq, V> SymbolTable<K, V>[src]

pub fn new() -> SymbolTable<K, V>[src]

Create a new, empty symbol table

impl<K: Hash + Eq, V, S: BuildHasher> SymbolTable<K, V, S>[src]

pub fn hasher(&self) -> &Rc<S>[src]

Get a reference to the table's BuildHasher

pub fn with_hasher<RS>(hasher: RS) -> SymbolTable<K, V, S> where
    Rc<S>: From<RS>, 
[src]

Construct an empty hash map using the provided hasher.

impl<K: Hash + Eq, V, S: BuildHasher> SymbolTable<K, V, S>[src]

pub fn get_prev(&self) -> Option<&Rc<SymbolTable<K, V, S>>>[src]

Get an Arc to the previous layer's table, if there is any

impl<K: Hash + Eq + Clone, V: Clone, S: BuildHasher> SymbolTable<K, V, S>[src]

pub fn extend(self) -> SymbolTable<K, V, S>[src]

Get a new symbol table extending this one

Trait Implementations

impl<K: Hash + Eq + Clone, V: Clone, S: BuildHasher> Clone for SymbolTable<K, V, S>[src]

impl<K: Hash + Eq + Debug, V: Debug, S: BuildHasher> Debug for SymbolTable<K, V, S>[src]

impl<K: Hash + Eq, V, S: BuildHasher + Default> Default for SymbolTable<K, V, S>[src]

impl<K: Hash + Eq, V: Eq, S: BuildHasher> Eq for SymbolTable<K, V, S>[src]

impl<K: Hash + Eq, V: Hash, S: BuildHasher> Hash for SymbolTable<K, V, S>[src]

impl<K: Hash + Eq + Clone, V: Clone, S: BuildHasher> MutSymbolMap<K> for SymbolTable<K, V, S>[src]

impl<K: Hash + Eq, V: PartialEq, S: BuildHasher> PartialEq<SymbolTable<K, V, S>> for SymbolTable<K, V, S>[src]

impl<K: Hash + Eq + Clone, V: Clone, S: BuildHasher> SymbolMap<K> for SymbolTable<K, V, S>[src]

type Value = V

The value stored in this symbol table

impl<K: Hash + Eq + Clone, V: Clone, S: BuildHasher> SymbolStack<K> for SymbolTable<K, V, S>[src]

Auto Trait Implementations

impl<K, V, S = RandomState> !RefUnwindSafe for SymbolTable<K, V, S>

impl<K, V, S = RandomState> !Send for SymbolTable<K, V, S>

impl<K, V, S = RandomState> !Sync for SymbolTable<K, V, S>

impl<K, V, S> Unpin for SymbolTable<K, V, S>

impl<K, V, S = RandomState> !UnwindSafe for SymbolTable<K, V, S>

Blanket Implementations

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

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

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

impl<T> From<T> for T[src]

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

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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

type Error = Infallible

The type returned in the event of a conversion error.

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

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

The type returned in the event of a conversion error.