FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    ComponentElement

    struct · ferroui-view · v0.5.0

    struct ComponentElement
    

    A component that runs again: its function runs when it is mounted, again whenever a signal it read changes or its parent runs again, and what it returns is patched into the controls it made before (see rerender and the hooks).

    View source

    Members

    name

    name: &'static str
    

    The name of the component, for messages.

    Source

    type_id

    type_id: std::any::TypeId
    

    The identity of the component: a component of another identity at the same place is mounted anew.

    Source

    key

    key: Option<Key>
    

    The key among its siblings.

    Source

    render

    render: std::rc::Rc<dyn Fn() -> Element>
    

    Runs the component with what its parent gave it.

    Source

    props

    props: Option<std::rc::Rc<dyn AnyValueEq>>
    

    What its parent gave it, when the component is memoized: a parent that runs again with equal values does not run it again.

    Source

    Trait implementations

    Availability

    Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.