Skip to main content

CacheKey

Trait CacheKey 

Source
pub trait CacheKey<W> {
    // Required method
    fn cache_key(&self, widget: &W) -> Option<u64>;
}
Expand description

Cache key strategy for a widget.

Required Methods§

Source

fn cache_key(&self, widget: &W) -> Option<u64>

Return a cache key for the widget, or None to disable key-based invalidation.

Implementors§

Source§

impl<W> CacheKey<W> for NoCacheKey

Source§

impl<W, F: Fn(&W) -> u64> CacheKey<W> for FnKey<F>

Source§

impl<W: Hash> CacheKey<W> for HashKey