pub enum ElementKind<A> {
Empty,
Widget(Rc<dyn Widget<A>>),
Component(Rc<dyn ComponentNode<A>>),
}Expand description
Runtime payload retained for one element.
Cloning a widget or component kind clones its Rc, preserving the same
object identity and UI-thread ownership.
§Examples
use ailloli_ui_runtime::element::ElementKind;
let kind: ElementKind<()> = ElementKind::Empty;
assert!(matches!(kind, ElementKind::Empty));Variants§
Empty
Structural placeholder with no widget callbacks.
Widget(Rc<dyn Widget<A>>)
Shared retained widget implementation.
Component(Rc<dyn ComponentNode<A>>)
Shared stateful declarative component implementation.
Trait Implementations§
Auto Trait Implementations§
impl<A> Freeze for ElementKind<A>
impl<A> !RefUnwindSafe for ElementKind<A>
impl<A> !Send for ElementKind<A>
impl<A> !Sync for ElementKind<A>
impl<A> Unpin for ElementKind<A>
impl<A> !UnwindSafe for ElementKind<A>
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<A> IntoClickAction<A> for Awhere
A: Clone + 'static,
impl<A> IntoClickAction<A> for Awhere
A: Clone + 'static,
Source§fn into_click_action(self) -> ClickAction<A>
fn into_click_action(self) -> ClickAction<A>
Implements the into_click_action helper used by this module.