pub trait Element {
    fn set_id(&mut self, element_id: ElementId);
    fn render(&mut self, coordinator: &mut Coordinator<'_, '_>) -> Result<()>;
    fn update_layout(&mut self, layout_accessor: &mut LayoutAccessor);
    fn is_input(&self) -> bool;
    fn captures_enter(&self) -> bool;
    fn update(&mut self, key: Key) -> bool;
}
Expand description

An element in the form which may be static content or an input.

Required Methods

Renders this element to the screen and returns the relative cursor position.

Whether this element accepts user input and thus should be focusable.

Whether this control should capture the Enter key, rather than advancing the form.

Update this element’s state with the given user input. Return whether to advance the form.

Implementors