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§
source§impl 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: 'static>(&self, f: impl Readable<V>) -> Rc<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§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more