pub enum Type {
}Expand description
The type of a prop, an event’s value, a binding or a piece of state: the language’s types.
Variants§
Text
Int
Float
Bool
Actor
A member: a person or an agent.
Resource
A resource the component presents.
Time
A moment: a date and a time of day, as the language’s Time.
Icon
One of the platform’s icons, by its kebab-case name.
Picture
A picture: where its bytes are read from, and what it shows the person.
File
A file a person handed the window — dropped on it, or chosen — as the runtime’s File:
what it is called, its media type, its size and where its bytes are.
RichText
Rich text, with how its references read for the person reading it.
Choice
One of a closed set of cases: the design system’s roles and tokens.
Option(Box<Type>)
List(Box<Type>)
Set(Box<Type>)
Distinct values in no order the component relies on: who reacted with an emoji.
Map
Values by key: the people who reacted, by emoji.
Action
An action offered to the person, as a control shows it: what it is called, its icon and role, and what choosing it runs (an event of the instance, never a closure).
Cases
One case of the catalogue’s closed set name whose cases carry fields: a drawing’s shape.
Enum
A case of one of the app’s own enums, by its name: which cases it holds is the field the binding names, so a description says only that it takes such a field.
Link
A record a view names, as the component offers it: what refers to it, and how it reads for the person now. What the component writes names the record, never the text, so a record renamed later reads by its new title everywhere it was linked.