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 strAuto Trait Implementations§
impl Freeze for ElementDef
impl RefUnwindSafe for ElementDef
impl Send for ElementDef
impl Sync for ElementDef
impl Unpin for ElementDef
impl UnsafeUnpin for ElementDef
impl UnwindSafe for ElementDef
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.