Skip to main content

Module surface

Module surface 

Source
Expand description

A resource’s public surface as data (tilo_actions::surface), read from its declarations and stored shape. tilolang surface writes it to the app’s surface.toml and compiled surface.json, and tilolang check compares it with the code, so a rename or an incompatible storage change shows up in review, and it is what the OS knows about an app that is not running and what another language compiles its actions and types against.

Structs§

FieldSurface
One stored field.
NamedType
A record or enum with a name, declared once in a surface’s types.
ParamSurface
One parameter of a verb.
ReturnsSurface
What an action answers its caller with: its JSON Schema, and its type (FieldType) with the records and enums it names declared in the surface’s types.
Surface
The public surface of one resource kind. See the module docs.
TypeCase
A case of a named enum, with the fields its value carries.
TypeField
A field of a named record or of an enum case.
TypeSet
The named types a surface declares, gathered while its fields’ types are worked out: each declared once under one name, however often it is used.
VerbSurface
One verb.

Enums§

FieldType
A field’s or value’s type. See the module docs.

Constants§

CONTENT_VERBS
The verbs the framework writes under on every record kind, which no app’s action publishes: a direct content edit (TYPE_VERB). A storage migration is the store’s own verb (crate::stamp::Stamp::MIGRATE_VERB), which no surface declares.
TYPE_VERB
The verb of a change that writes a record’s content directly, with no finer action: typing in a cell, a list splice made from the window. The framework stamps such a change with it.

Functions§

effect_verb
An effect’s declaration as a verb of the surface: its id, words, parameters and the value it answers with, each typed by its schema.
effect_verbs
An app’s effects as actions a caller of another language reads: every one that only reads (kind = "read") and that is offered on the app’s own resource, answering with the value it declares. An effect offered on a row of a declared type is one of them: the resource’s action, its parameter naming the row it acts on. What its window shows (a view’s zoom, its caret) is no action of the catalogue, and neither is one offered on an item of the resource’s collection: that is published on the item itself.
reading_surface
The surface of a resource a service publishes outside any record (the sound, the network, the battery): its fields are its reading R, as the service serialises it, each read-only since only the service’s effects change it, and its verbs are the effects E it offers on it. What a view of another language reads and presses of it, typed as the service declares it.
row_surface
The surface of the row type R, whose rows a reading carries with their addresses (crate::Handle): its kind, its name, and the effects E it offers on each row, called on the row’s address. Its fields are the record the reading declares for it, so it lists none of its own.
surface_of
The surface of R, from its declarations and stored shape.
view_effects
The ids of an app’s effects that show something in its window (#[effect(view)]): what its surface declares it Surface::shows.

Type Aliases§

FieldTypeOf
How a value’s FieldType is worked out, declaring the records and enums it names: a type’s field_type.
FlatTypes
A flattened parameter’s record fields and their published types, by name, as the code declares them.