Skip to main content

View

Trait View 

Source
pub trait View: 'static {
    // Required method
    fn build(self, ui: &Ui) -> NodeId;
}
Expand description

Something that can build itself into the node tree.

Component functions run once and return a View. Building creates the nodes and the effects that keep their props up to date.

Required Methods§

Source

fn build(self, ui: &Ui) -> NodeId

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl View for &'static str

Source§

fn build(self, ui: &Ui) -> NodeId

Source§

impl View for String

Source§

fn build(self, ui: &Ui) -> NodeId

Implementors§

Source§

impl View for AnyView

Source§

impl View for Element

Source§

impl View for MenuBar

Source§

impl View for Show

Source§

impl View for TrayIcon

Source§

impl<T: Clone + 'static, K: Eq + Hash + 'static> View for For<T, K>

Source§

impl<T: Clone + 'static, K: Eq + Hash + Clone + 'static> View for List<T, K>

Source§

impl<T: Clone + 'static, K: Eq + Hash + Clone + 'static> View for Table<T, K>

Source§

impl<T: Clone + 'static, K: Eq + Hash + Clone + 'static> View for Tree<T, K>

Source§

impl<W: CustomWidget> View for Custom<W>