mirui 0.23.0

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
14
15
16
#[derive(Debug)]
pub enum CacheError<E = core::convert::Infallible> {
    Disabled,
    TooLarge,
    Factory(E),
}

impl<E: core::fmt::Display> core::fmt::Display for CacheError<E> {
    fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
        match self {
            CacheError::Disabled => f.write_str("cache disabled (max_size = 0)"),
            CacheError::TooLarge => f.write_str("entry exceeds cache max_size"),
            CacheError::Factory(e) => write!(f, "factory error: {e}"),
        }
    }
}