pub struct ElementDef {
pub name: &'static str,
pub jsx_own: &'static [&'static str],
pub lua_own: &'static [&'static str],
pub jsx_rows: Option<&'static [&'static str]>,
pub lua_rows: Option<&'static [&'static str]>,
pub jsx: &'static str,
pub lua: &'static str,
pub c: &'static str,
pub odin: &'static str,
pub doc: &'static str,
}Expand description
An element (node type) and its spelling in each binding. Elements are hand-lowered per binding (their shapes differ: JSX children, Lua tables, C calls with body callbacks), so this table is documentation and a checklist, not a code generator’s input.
Fields§
§name: &'static str§jsx_own: &'static [&'static str]The props this element lowers itself, which are therefore in neither
PROPS nor CUSTOM: <edit initial multiline>, <image src>. They
ride in the same prop list as the node’s, so a binding needs them to
tell a legitimate element prop from a misspelling (see
known_prop) — JSX’s spellings here, Lua’s below.
lua_own: &'static [&'static str]The same for a Lua node table.
jsx_rows: Option<&'static [&'static str]>The schema rows this element reads, or None for every one. A
composite whose look is its spec — the stock button, whose
padding, colours and radius are widgets::button_spec — cannot take
the whole prop list: dir alone rebuilds the spec from nothing. It
names the rows it reads instead, and a binding drops the rest with a
warning that says which rows it does take (known_prop,
diag::unknown_prop). JSX spellings here, Lua’s below.
lua_rows: Option<&'static [&'static str]>§jsx: &'static str§lua: &'static str§c: &'static str§odin: &'static strThe Odin procedures (kui. and the name); checked by the Odin
generator like the composites’ column.
doc: &'static str