pub struct Cache<'a> { /* private fields */ }Expand description
Names what a graph produces, and keeps it in a store.
Implementations§
Trait Implementations§
Source§impl Keeper for Cache<'_>
impl Keeper for Cache<'_>
Source§fn present(&self, keys: &[&Key]) -> Result<Vec<bool>, KeeperError>
fn present(&self, keys: &[&Key]) -> Result<Vec<bool>, KeeperError>
One scan and no fetches, which is the whole reason the engine asks this instead of reading: what it wants to know is whether it can skip the node underneath, and the bytes of the answer are somebody else’s business — often nobody’s.
Source§fn key_of(&self, value: &Value) -> Option<Key>
fn key_of(&self, value: &Value) -> Option<Key>
The key of a value by its content, which only a root needs: from
there down, keys come from keys.
None if the value cannot leave this
process, which is not a failure — nothing below it is cached either.Source§fn combine(&self, parts: &[&str]) -> Key
fn combine(&self, parts: &[&str]) -> Key
One key out of the ingredients of a recipe, in the order given. The
parts have to stay apart: run together,
["ab", "c"] and
["a", "bc"] would name the same thing.Auto Trait Implementations§
impl<'a> Freeze for Cache<'a>
impl<'a> !RefUnwindSafe for Cache<'a>
impl<'a> Send for Cache<'a>
impl<'a> Sync for Cache<'a>
impl<'a> Unpin for Cache<'a>
impl<'a> UnsafeUnpin for Cache<'a>
impl<'a> !UnwindSafe for Cache<'a>
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