Skip to main content

Crate sofie_engine

Crate sofie_engine 

Source
Expand description

There is no way to emit raw HTML from data.

Modules§

development
islands
Props travel as JSON in a <script type="application/json"> child, which the browser never runs, so they need no nonce and no attribute escaping.
rendering

Macros§

client_bundle
The area’s bundle the app’s build script wrote to OUT_DIR/clients, with its compressed copies when built with them.
island_bundle
The area’s bundle the app’s build script wrote to OUT_DIR/islands, with its compressed copies when built with them.

Structs§

ActionPost
An <Action>’s target and the input fields its with posts, where it is written.
AskedEntitlement
An entitled("…") gate a template asks, where it is written.
Asset
Served under its content hash, so a browser may cache it until the file changes.
Binding
Lets sofie check hold a template against the loader’s type without rendering.
ClientBundle
ClientLinks
Where the shell loads the bundle from: the embedded one, or the one sofie dev rebuilt.
ClientShell
ClientView
Serialized from the language’s cached view, which is shared rather than copied per request.
ComponentSpec
Components
A module’s web/<Name>.html, written in a screen as <Name prop={…} /> and inlined where it is written, so rendering pays nothing for it.
FormPost
A bound path part is written {}, as in /account/orders/{}/cancel.
Gap
IdPattern
KeyUse
Language
Page
Precompressed
PropSpec
ScriptNotices
What engine.js says when a request fails, in the page’s language.
Submitted
Shown again in the form whose post is action, so nothing typed is lost but a password.
TableLink
A Table’s row link, where the table is written.
Template
TemplateError
Translations

Enums§

Children
Client
GapKind
KeyKind
PropKind
RenderError
Step
Tone
TranslationError

Constants§

CLIENT_SCRIPT
htmx, pinned; see assets/PROVENANCE.
CURRENCY_SYMBOLS
Only symbols that name one currency wherever they are read. The currencies written with a symbol rather than their code.
ENGINE_SCRIPT
Field state htmx cannot keep, menus and panels, and a notice for an unanswered request.
NOTICE_TARGET
SCREEN_ELEMENT
SPECS
Every component, whichever features this build enables.
STYLESHEET

Functions§

action_posts_with
asked_entitlements
A component’s gates are asked where it is written, so they are the screen’s.
bindings
bindings_with
A component’s paths are bound from where it is written, so they are the screen’s.
check_translations
compile_client
One screen as the source of a component taking data and view props.
compile_template
compile_template_with
The module components a screen writes are compiled into it.
compile_template_with_texts
Each t(…) call keeps its text in the source language of translations, so an app built without i18n writes it.
english
An engine text in English, or the key itself where lang/en.toml lacks it, as a missing translation is written.
field_errors
A form id or field that is not a plain name is skipped, so request data cannot widen selectors.
form_fields
The fields Form form_id shows an error under, or None when the template has no such form: an error for any other name, or for a post without a form, belongs in the notice.
humanize
instant_fields
Where the data a client area is sent holds instants, which its JSON writes as text: the sent data’s shape with each instant true, a list standing for all its items, null where none is. Only an instant sent as text is marked, so a withheld one’s name is not sent either.
is_field_name
load_template
Reads what compile_template wrote, so a built app needs no parser.
notice
parse_template_with_recorded
As Template::parse_with, with each t(…) given the source-language text the screen’s compiled program recorded for its key: a development build rereads a screen this way, and a build without i18n writes that text.
plain_client_view
What a client area’s screen is given beside its data, for no request.
push_escaped
table_links_with
translation_keys
with_cleared_notice