mirror of
https://github.com/salsa-rs/salsa.git
synced 2025-01-15 01:39:25 +00:00
Add comments describing InputFieldIngredient
Co-authored-by: Niko Matsakis <niko@alum.mit.edu>
This commit is contained in:
parent
11b23c942b
commit
9b7f7fd4ed
1 changed files with 5 additions and 0 deletions
|
@ -7,6 +7,11 @@ use crate::key::DependencyIndex;
|
|||
use crate::runtime::local_state::QueryInputs;
|
||||
use crate::runtime::StampedValue;
|
||||
|
||||
/// Ingredient used to represent the fields of a `#[salsa::input]`.
|
||||
/// These fields can only be mutated by an explicit call to a setter
|
||||
/// with an `&mut` reference to the database,
|
||||
/// and therefore cannot be mutated during a tracked function or in parallel.
|
||||
/// This makes the implementation considerably simpler.
|
||||
pub struct InputFieldIngredient<K, F> {
|
||||
index: IngredientIndex,
|
||||
map: FxHashMap<K, StampedValue<F>>
|
||||
|
|
Loading…
Reference in a new issue