pub struct AtomRoot {
pub atoms: RefCell<HashMap<AtomId, Slot>>,
pub update_any: Arc<dyn Fn(ScopeId)>,
}Fields
atoms: RefCell<HashMap<AtomId, Slot>>update_any: Arc<dyn Fn(ScopeId)>Implementations
sourceimpl AtomRoot
impl AtomRoot
pub fn new(update_any: Arc<dyn Fn(ScopeId)>) -> Self
pub fn initialize<V: 'static>(&self, f: impl Readable<V>)
pub fn register<V: 'static>(&self, f: impl Readable<V>, scope: ScopeId) -> Rc<V>
pub fn set<V: 'static>(&self, ptr: AtomId, value: V)
pub fn unsubscribe(&self, ptr: AtomId, scope: ScopeId)
pub fn force_update(&self, ptr: AtomId)
pub fn read<V>(&self, _f: impl Readable<V>) -> &V
Auto Trait Implementations
impl !RefUnwindSafe for AtomRoot
impl !Send for AtomRoot
impl !Sync for AtomRoot
impl Unpin for AtomRoot
impl !UnwindSafe for AtomRoot
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more