Skip to content

struct

VElement

pub struct VElement {
    pub tag: String,
    pub attrs: BTreeMap<String, Value>,
    pub events: Vec<EventHandler>,
    pub children: Vec<VNode>,
}

An element in the rendered tree: its tag, attributes, event handlers and children.

Fields

tag

pub tag: String

The DSL element name (e.g. column, button, canvas2d).

attrs

pub attrs: BTreeMap<String, Value>

Attributes by name.

events

pub events: Vec<EventHandler>

Event handlers, in the order they were written.

children

pub children: Vec<VNode>

Child nodes.

Methods

handlers_for

pub fn handlers_for(&self, kind: &str) -> Vec<Handler>

Handlers registered for an event kind.

Trait implementations