Skip to main content

Module hir

Module hir 

Source
Expand description

The checked program: every name resolved to an id, every expression typed, and every dynamic part of the UI annotated with the state it reads.

Macros§

id đź”’

Structs§

Binding
A two-way binding: the control shows the place’s value and writes the user’s edits to it.
Dialog
A pick_…(…) call: once the event finishes, shows a file dialog, and writes the path or paths the user picks to answer. Cancelling leaves answer as it was. Settings the call leaves out are empty: "", or [] for types.
Download
A download(…) call: fetches url into the folder folder on another thread, as name, or after the address when that is "", over up to connections connections at once, sending headers and trying failed connections again up to retries times, writing how it is going to each bound place: always its percentage done and a description of where it stands, and the other fields the call binds.
Dynamic
An expression the UI shows, with the states whose changes require showing it again.
Expr
FieldDef
FnDef
Parameters occupy the first locals, in order.
FnId
LocalId
Loop
A for’s variables and what it loops over.
Menu
A menu: its title, and its entries in order. A is what an item does: an action the app runs, or, as backends receive it, the number of the item.
MenuBar
The app’s menus, in order, whose items’ actions share one frame of locals.
NavItem
A sidebar row, selected while selection holds value.
Place
A location that can be assigned or bound: state or a local, then fields and indexes.
Program
Shortcut
A keyboard shortcut: the platform’s command key, Cmd on macOS and Ctrl on Windows, with key, and Shift or Alt (Option on macOS) when set. repr(C) because compiled apps store it as is.
StateDef
StateId
One state declaration of the app, numbered in the order they are declared.
StateSet
States read by a dynamic part of the UI, sorted and without duplicates.
StructDef
StructId
ViewDef
ViewId
WindowDef
WindowId

Enums§

BinaryOp
DialogKind
What a dialog asks the user to pick. Compiled code passes it to the runtime as a u32, which every platform’s C calling convention passes without widening.
DownloadCommand
What code asks of a running download, by its id. repr(u32) because compiled apps pass it to the runtime, which every platform’s C calling convention passes without widening.
DownloadField
A piece of state a download reports into. Compiled apps pass it to the runtime by its code.
ExprKind
Iterable
What a for loops over. Looping over a place makes the loop variable an alias of each element, so assigning through it changes the original list.
MenuEntry
Node
UI parts are shared, so whatever runs the program can keep them for as long as it shows them.
PlaceRoot
PlaceStep
Segment
Stmt
Type
WindowAction
What code asks of a window. repr(u32) because compiled apps pass it to the runtime, which every platform’s C calling convention passes without widening.

Constants§

PRIMITIVE_TYPES
The built-in types; Type::primitive_name spells them.

Type Aliases§

Block
Nodes