salsa 0.26.1

A generic framework for on-demand, incrementalized computation (experimental)
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use crate::Id;
use crate::function::{Configuration, IngredientImpl};
use crate::zalsa::Zalsa;
use crate::zalsa_local::QueryOriginRef;

impl<C> IngredientImpl<C>
where
    C: Configuration,
{
    pub(super) fn origin<'db>(&self, zalsa: &'db Zalsa, key: Id) -> Option<QueryOriginRef<'db>> {
        let memo_ingredient_index = self.memo_ingredient_index(zalsa, key);
        self.get_memo_from_table_for(zalsa, key, memo_ingredient_index)
            .map(|m| m.revisions.origin.as_ref())
    }
}