Skip to main content

HasProbe

Trait HasProbe 

Source
pub trait HasProbe {
    type Meta: Clone + HasSize + 'static;

    // Required method
    fn extract_meta(&self) -> Self::Meta;
}
Expand description

Dual of HasSize: HasSize quantifies a value’s byte cost so the cache can evict by bytes; HasProbe extracts a cheap metadata snapshot so a caller can answer “what is this resource” without a full decode.

Meta: HasSize is required because the manager stores Meta values in a secondary cache that follows the cache framework’s API contract.

Required Associated Types§

Source

type Meta: Clone + HasSize + 'static

Required Methods§

Source

fn extract_meta(&self) -> Self::Meta

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§