pub enum PropKind {
Show 44 variants
Id,
Keyword(&'static [&'static str]),
DisplayText,
LocalizedText,
Icon,
ImageResource,
SvgResource,
Number,
Shortcut,
Length,
FileKinds,
FileField,
PositionField,
Flag,
NumberValue,
Bool,
TextValue,
TextField,
BoolField,
NumberField,
PickerField,
SelectionField,
SelectionValue,
Items,
KeyField,
PathField,
KeysField,
Route,
WindowId,
TypeName,
SlotName,
StyleVariant,
Transition,
MotionToken,
HeroName,
KeyValue,
Watched,
ColorRole,
NumberList,
PatternName,
MediaSource,
Player,
Query,
Feature,
}Expand description
How a property value is written and checked.
Variants§
Id
Stable control identity: an identifier or a text literal.
Keyword(&'static [&'static str])
One of a fixed set of keywords.
DisplayText
tr! text or a displayable binding (text, int, float, labelled enum).
LocalizedText
Only tr! text; used where data would make no sense (window titles).
Icon
Icon name literal from the Bern icon set (SF Symbols naming).
ImageResource
Name literal of a declared image resource (PNG or JPEG), such as
"images/cover.png".
SvgResource
A bundled SVG document, with CSS/SMIL and document-local scripts.
Number
Numeric literal in logical units.
Shortcut
A keyboard shortcut: a literal such as "cmd+k", "space" or
"cmd+shift+p", checked when the application is built (see
parse_shortcut), or a text the shortcut follows while the
application runs, such as app.keys.open, read by the same rules;
a text that is empty or no shortcut gives none.
Length
A length in logical units: a literal, or a numeric expression the
length follows, such as if window.idle { 0 } else { 24 }.
FileKinds
The kinds of file a control accepts, a literal such as
"video .ass .srt"; see parse_file_kinds.
FileField
Writable session field holding a MediaSource (or an optional
one): the file the user chose or dropped.
PositionField
Writable session i64 or String field holding the key of the
item a scroll view stands at.
Flag
A literal true or false, fixed when the application is built.
NumberValue
Numeric restricted expression (int or float), read only.
Bool
Boolean restricted expression.
TextValue
Text restricted expression, read only, such as app.name.
TextField
Writable session text field.
BoolField
Writable session bool field.
NumberField
Writable session float field.
PickerField
Writable session enum field whose variants all carry labels.
SelectionField
Writable session enum field selecting among child items.
SelectionValue
Value matching the enclosing selection field’s enum.
Items
List binding of records feeding a row template.
KeyField
Field name of the row record used as stable key.
PathField
Writable session list of a route enum.
KeysField
Writable session list of String or i64 keys: the rows of a
Table that are chosen.
Route
Route value for the enclosing navigation path.
WindowId
Window kind identifier.
TypeName
Name of the generated window handle type.
SlotName
Name of a slot that modules contribute to.
StyleVariant
Name of a style variant the application declares in style!.
Transition
Name of a transition from style!, such as pop or fade.
MotionToken
Name of a motion token, such as smooth.
HeroName
Name pairing two elements as one shared element.
KeyValue
A text, number or enum value identifying something, read only.
Watched
A value an element follows, read only: a bool, number, text or
enum, or an optional or a list of them, such as draft.selected.
ColorRole
A semantic color role, such as accent or fill.subtle.
NumberList
A list of numbers, read only, such as the values a Series draws.
PatternName
Name of a pattern from style!.
MediaSource
Binding of a MediaSource, optional or not, followed by the player
the declaration creates.
Player
An application player from the #[bern::players] catalog.
Query
A typed query call such as app.search(draft.text), whose result
feeds the element’s template.
Feature
A feature of the enclosing contract, such as MediaFeature::Clip.