pub trait ElementComponent: Debug + ElementComponentName + DynClone + Sync + Send {
    // Required method
    fn render(self: Box<Self>, hooks: &mut Hooks<'_>) -> Element;
}
Expand description

The base trait for all element components. These are similar to React components.

The render method is called to create the virtual tree for this component. It will only be called when the component is first created, or when one of its dependencies changes. These dependencies can include properties or state introduced by Hooks.

Required Methods§

source

fn render(self: Box<Self>, hooks: &mut Hooks<'_>) -> Element

Render the virtual tree for this component.

Trait Implementations§

source§

impl<'clone> Clone for Box<dyn ElementComponent + 'clone>

source§

fn clone(&self) -> Box<dyn ElementComponent + 'clone>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<'clone> Clone for Box<dyn ElementComponent + Send + 'clone>

source§

fn clone(&self) -> Box<dyn ElementComponent + Send + 'clone>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<'clone> Clone for Box<dyn ElementComponent + Sync + Send + 'clone>

source§

fn clone(&self) -> Box<dyn ElementComponent + Sync + Send + 'clone>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<'clone> Clone for Box<dyn ElementComponent + Sync + 'clone>

source§

fn clone(&self) -> Box<dyn ElementComponent + Sync + 'clone>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more

Implementations on Foreign Types§

source§

impl ElementComponent for ImageFromUrl

source§

fn render(self: Box<ImageFromUrl>, _: &mut Hooks<'_>) -> Element

source§

impl<T> ElementComponent for Vec<T>
where T: ElementComponent + Clone + 'static,

source§

fn render(self: Box<Vec<T>>, _: &mut Hooks<'_>) -> Element

source§

impl<T> ElementComponent for HashMap<String, T>
where T: ElementComponent + Clone + 'static,

source§

fn render(self: Box<HashMap<String, T>>, _: &mut Hooks<'_>) -> Element

Implementors§

source§

impl ElementComponent for AnimationPlayer

source§

impl ElementComponent for BlendNode

source§

impl ElementComponent for PlayClipFromUrl

source§

impl ElementComponent for Transition

source§

impl ElementComponent for Alert

source§

impl ElementComponent for BookFile

source§

impl ElementComponent for Bookcase

source§

impl ElementComponent for Button

source§

impl ElementComponent for Centered

source§

impl ElementComponent for Checkbox

source§

impl ElementComponent for ClickArea

source§

impl ElementComponent for DialogScreen

source§

impl ElementComponent for Dock

source§

impl ElementComponent for Dropdown

source§

impl ElementComponent for DropdownSelect

source§

impl ElementComponent for DurationEditor

source§

impl ElementComponent for EditorColumn

source§

impl ElementComponent for EditorRow

source§

impl ElementComponent for FixedGrid

source§

impl ElementComponent for Flow

source§

impl ElementComponent for FlowColumn

source§

impl ElementComponent for FlowRow

source§

impl ElementComponent for FontAwesomeIcon

source§

impl ElementComponent for Group

source§

impl ElementComponent for Hotkey

source§

impl ElementComponent for IntegerSlider

source§

impl ElementComponent for LayoutFreeCenter

source§

impl ElementComponent for Line

source§

impl ElementComponent for ListSelect

source§

impl ElementComponent for MeasureAbsolutePosition

source§

impl ElementComponent for MeasureSize

source§

impl ElementComponent for PageScreen

source§

impl ElementComponent for Prompt

source§

impl ElementComponent for Rectangle

source§

impl ElementComponent for ScreenContainer

source§

impl ElementComponent for ScrollArea

source§

impl ElementComponent for Separator

source§

impl ElementComponent for Slider

source§

impl ElementComponent for SystemTimeEditor

source§

impl ElementComponent for Text3D

source§

impl ElementComponent for Text

source§

impl ElementComponent for TextEditor

source§

impl ElementComponent for Throbber

source§

impl ElementComponent for Tooltip

source§

impl ElementComponent for UIBase

source§

impl ElementComponent for Window

source§

impl ElementComponent for WindowSized

source§

impl ElementComponent for Wrap

source§

impl<K, V> ElementComponent for IndexMapEditor<K, V>
where K: Hash + Eq + Send + Sync + Debug + 'static + Clone + Editor + Default, V: Send + Sync + Debug + 'static + Clone + Editor + Default,

source§

impl<K, V> ElementComponent for KeyValueEditor<K, V>
where K: Editor + Debug + Clone + Default + Hash + PartialEq + Eq + PartialOrd + Ord + Sync + Send + 'static, V: Editor + Debug + Clone + Default + Sync + Send + 'static,

source§

impl<P> ElementComponent for Memo<P>
where P: ElementComponent + PartialEq + Clone + 'static,

source§

impl<T> ElementComponent for CustomParseInput<T>
where T: Debug + Clone + Sync + Send + 'static,

source§

impl<T> ElementComponent for EditorPrompt<T>
where T: Editor + Debug + Clone + Sync + Send + 'static,

source§

impl<T> ElementComponent for ListEditor<T>
where T: Editor + Debug + Clone + Default + Sync + Send + 'static,

source§

impl<T> ElementComponent for MinimalListEditor<T>
where T: Editor + Debug + Clone + Default + Sync + Send + 'static,

source§

impl<T> ElementComponent for MinimalListEditorItem<T>
where T: Debug + Clone + Default + Sync + Send + 'static,

source§

impl<T> ElementComponent for MinimalListEditorWithItemEditor<T>
where T: Debug + Clone + Default + Sync + Send + 'static,

source§

impl<T> ElementComponent for OffscreenEditor<T>
where T: Debug + Clone + Sync + Send + 'static + Editor,

source§

impl<T> ElementComponent for ParseableInput<T>
where T: FromStr + Debug + Display + Clone + Sync + Send + 'static,

source§

impl<T> ElementComponent for TabBar<T>
where T: ToString + PartialEq + Clone + Debug + Sync + Send + 'static,

source§

impl<T> ElementComponent for Tabs<T>
where T: ToString + PartialEq + Default + Clone + Debug + Sync + Send + 'static,

source§

impl<const C: usize, T> ElementComponent for ArrayEditor<C, T>
where T: 'static + Clone + Debug + Editor + Send + Sync,