pub struct ComponentRuntime<C: Component> { /* private fields */ }Expand description
Component runtime manages the lifecycle of a mounted component
Implementations§
Source§impl<C: Component + 'static> ComponentRuntime<C>
impl<C: Component + 'static> ComponentRuntime<C>
Sourcepub fn register_event<F>(&mut self, event_name: String, handler: F)where
F: Fn() + 'static,
pub fn register_event<F>(&mut self, event_name: String, handler: F)where
F: Fn() + 'static,
Register an event handler
Sourcepub fn dispatcher(&self) -> Rc<RefCell<ComponentEventDispatcher>>
pub fn dispatcher(&self) -> Rc<RefCell<ComponentEventDispatcher>>
Get the event dispatcher (for wiring up DOM events)
Auto Trait Implementations§
impl<C> Freeze for ComponentRuntime<C>
impl<C> !RefUnwindSafe for ComponentRuntime<C>
impl<C> !Send for ComponentRuntime<C>
impl<C> !Sync for ComponentRuntime<C>
impl<C> Unpin for ComponentRuntime<C>
impl<C> !UnwindSafe for ComponentRuntime<C>
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