Skip to main content

declare

Function declare 

Source
pub fn declare<T>(db: &Db, declarations: impl FnOnce() -> T) -> T
Expand description

Run declarations with db’s app schema in scope, so every path they bind resolves an embedded leaf to its flattened storage column.

Mounting a panel (RouterBuilderPanelExt::panel) calls each resource’s declarations inside such a scope. Call this to build a declaration outside a panel, such as a Schema a custom page renders:

let form = tablo_core::declare(&db, PostForm::schema);