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.