Skip to main content

build_ctx

Function build_ctx 

Source
pub fn build_ctx(
    dc: &DataContext,
    rc: &RenderContext,
    declared_deps: &[DataDep],
    config: Dynamic,
) -> Dynamic
Expand description

Build the ctx value a plugin’s render(ctx) function sees.

declared_deps gates which lazy sources get mirrored. config is the plugin’s [segments.<id>] TOML table already converted to a rhai-compatible Dynamic (use () when no table is configured). rc is the per-render layout state surfaced as ctx.renderctx.render.terminal_width today, more fields later.