Skip to main content

CustomProp

Struct CustomProp 

Source
pub struct CustomProp {
    pub name: &'static str,
    pub id: u32,
    pub jsx_names: &'static [&'static str],
    pub lua_names: &'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

A prop every binding handles by hand (a composite with real logic, or a constructor-order special), with its wire id so transports agree on identity and its per-binding spelling so the docs can say so.

Fields§

§name: &'static str§id: u32§jsx_names: &'static [&'static str]

Every prop name a JSX view may write for it — the machine-readable half of jsx, which is prose for the docs. A composite is spelled differently in each binding (borderW here, border = {…} there), so the two lists are separate; together with PROPS and an element’s own props they are the whole allow-list a binding checks a view against (see known_prop).

§lua_names: &'static [&'static str]

The same for a Lua node table.

§jsx: &'static str

How JSX spells it.

§lua: &'static str

How a Lua table spells it.

§c: &'static str

Where it lands in C.

§odin: &'static str

Where it lands in Odin (packages/odin): a Spec / Text_Style field, or a kui. procedure for a window-level row. The Odin generator checks every name here is one its package has.

§doc: &'static str

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.