Trait fermi::Readable

source ·
pub trait Readable<V> {
    // Required methods
    fn read(&self, root: AtomRoot) -> Option<V>;
    fn init(&self) -> V;
    fn unique_id(&self) -> AtomId;
}
Expand description

All Atoms are Readable - they support reading their value.

This trait lets Dioxus abstract over Atoms, AtomFamilies, AtomRefs, and Selectors. It is not very useful for your own code, but could be used to build new Atom primitives.

Required Methods§

source

fn read(&self, root: AtomRoot) -> Option<V>

source

fn init(&self) -> V

source

fn unique_id(&self) -> AtomId

Implementors§

source§

impl<K, V> Readable<HashMap<K, V>> for &'static AtomFamily<K, V>

source§

impl<V> Readable<RefCell<V>> for &'static AtomRef<V>

source§

impl<V> Readable<V> for &'static Atom<V>