mirui 0.39.2

A lightweight, no_std ECS-driven UI framework for embedded, desktop, and WebAssembly
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
use crate::core::cache::HasSize;

/// 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.
pub trait HasProbe {
    type Meta: Clone + HasSize + 'static;

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