euv-core 0.42.0

Core cross-platform runtime for euv featuring arena-based fine-grained reactivity, deterministic layout, flat scene graph, multi-mode rendering, and direct OS platform adapters.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use super::*;

/// O(1) keyed reactive selector notifying only the previously selected and newly selected keys.
#[derive(CustomDebug)]
pub struct Selector<K>
where
    K: Clone + Eq + Hash + 'static,
{
    /// Active key value mirror.
    #[debug(skip)]
    pub(crate) active: Rc<RefCell<Option<K>>>,
    /// Per-key boolean selection signals.
    #[debug(skip)]
    pub(crate) subscribers: Rc<RefCell<HashMap<K, Signal<bool>>>>,
    /// Effect watching the source key producer.
    pub(crate) watcher: Effect,
}