Expand description
Dyn blocks — UI-defined field groups that flow through the
existing Block machinery without inventory
registration.
A DynBlockDef is compiled from a schema/component
GroupDef and implements the
Block trait, so the admin stream editor (render_block_inline), the
public renderer (default_render), and version migration all treat it
exactly like a code block. The trait wants &'static str names — dyn
defs intern theirs through a leak-once cache (bounded by the distinct
slugs/labels edited over a process lifetime; precedent:
block/registry.rs uses Box::leak for diagnostics).
Resolution is an explicit overlay: a per-request
DynBlockSet (loaded from the tenant’s published schema) is checked
before the inventory registry. No global state, tenant-safe.
Structs§
- DynBlock
Def - A UI-defined block: shape resolved from the DB at compile time, then behaviorally identical to a code block.
Functions§
- resolve
- Resolve a block type through the overlay first, then the inventory registry. THE lookup for every stream consumer that supports dyn blocks.
Type Aliases§
- DynBlock
Set - The per-request set of UI-defined block types, keyed by type name
(
r_<key>repeater items, zone-local group keys,c_<slug>components). Loaded from the published schema; passed by reference throughBlockRenderCtx::dyn_blocksand the_witheditor variants.