pub struct HashMapStorage<K, Hasher = FxBuildHasher>{ /* private fields */ }Trait Implementations§
Source§impl<K, H> Default for HashMapStorage<K, H>
impl<K, H> Default for HashMapStorage<K, H>
Source§impl<'de, K, H> Deserialize<'de> for HashMapStorage<K, H>where
K: Deserialize<'de> + Hash + Eq + Computation + Clone,
K::Output: Deserialize<'de>,
H: Default + BuildHasher + Clone,
impl<'de, K, H> Deserialize<'de> for HashMapStorage<K, H>where
K: Deserialize<'de> + Hash + Eq + Computation + Clone,
K::Output: Deserialize<'de>,
H: Default + BuildHasher + Clone,
Source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl<K, H> Serialize for HashMapStorage<K, H>where
K: Serialize + Computation + Eq + Hash + Clone,
K::Output: Serialize + Clone,
H: BuildHasher + Clone,
impl<K, H> Serialize for HashMapStorage<K, H>where
K: Serialize + Computation + Eq + Hash + Clone,
K::Output: Serialize + Clone,
H: BuildHasher + Clone,
Source§impl<K, H> StorageFor<K> for HashMapStorage<K, H>
impl<K, H> StorageFor<K> for HashMapStorage<K, H>
Source§fn get_cell_for_computation(&self, key: &K) -> Option<Cell>
fn get_cell_for_computation(&self, key: &K) -> Option<Cell>
Given a computation key, return the cell associated with it, if it exists.
Source§fn insert_new_cell(&self, cell: Cell, key: K)
fn insert_new_cell(&self, cell: Cell, key: K)
Insert a new Cell with the given computation that has yet to be run
Source§fn try_get_input(&self, cell: Cell) -> Option<K>
fn try_get_input(&self, cell: Cell) -> Option<K>
Retrieve the input for this computation, returning
None if not found.Source§fn get_input(&self, cell: Cell) -> K
fn get_input(&self, cell: Cell) -> K
Retrieve the input for this computation.
The input is expected to already be inserted into this storage.
Source§fn get_output(&self, cell: Cell) -> Option<K::Output>
fn get_output(&self, cell: Cell) -> Option<K::Output>
Retrieve the output for the given cell, if it exists
Source§fn update_output(&self, cell: Cell, new_value: K::Output) -> bool
fn update_output(&self, cell: Cell, new_value: K::Output) -> bool
C has been re-run and has returned the output new_value, return true
if new_value has changed from its previous value, and cache the new value
if needed. If C::ASSUME_CHANGED is true, skip the comparison and assume the value changed.fn gc(&mut self, used_cells: &HashSet<Cell>)
Auto Trait Implementations§
impl<K, Hasher> Freeze for HashMapStorage<K, Hasher>where
Hasher: Freeze,
impl<K, Hasher = FxBuildHasher> !RefUnwindSafe for HashMapStorage<K, Hasher>
impl<K, Hasher> Send for HashMapStorage<K, Hasher>
impl<K, Hasher> Sync for HashMapStorage<K, Hasher>
impl<K, Hasher> Unpin for HashMapStorage<K, Hasher>where
Hasher: Unpin,
impl<K, Hasher> UnwindSafe for HashMapStorage<K, Hasher>
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