pub type lv_cache_t = _lv_cache_t;Expand description
The cache entry struct
Aliased Type§
#[repr(C)]pub struct lv_cache_t {
pub clz: *const _lv_cache_class_t,
pub node_size: u32,
pub max_size: u32,
pub size: u32,
pub ops: _lv_cache_ops_t,
pub lock: i32,
pub name: *const i8,
}Fields§
§clz: *const _lv_cache_class_t< Cache class. There are two built-in classes:
- lv_cache_class_lru_rb_count for LRU-based cache with count-based eviction policy.
- lv_cache_class_lru_rb_size for LRU-based cache with size-based eviction policy.
node_size: u32< Size of a node
max_size: u32< Maximum size of the cache
size: u32< Current size of the cache
ops: _lv_cache_ops_t< Cache operations struct _lv_cache_ops_t
lock: i32< Cache lock used to protect the cache in multithreading environments
name: *const i8< Name of the cache