Skip to main content

HydrationPolicy

Trait HydrationPolicy 

Source
pub trait HydrationPolicy:
    Debug
    + Send
    + Sync {
    // Required method
    fn hydrate(&self, request: &HydrationRequest<'_>) -> Option<CacheEntry>;
}
Expand description

Decide if a materialized entry should be promoted back into memory.

Required Methods§

Source

fn hydrate(&self, request: &HydrationRequest<'_>) -> Option<CacheEntry>

Determine how to hydrate a cache entry that was just materialized. Return a new cache entry to insert if hydration is desired.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§