JsonView builder
A collapsible view of a structured value.
A builder is RenderOnce. Construct and mount it in one expression.
use gpui_kit::structured::JsonView;
Construct
new(ident: impl Into<Ident>, value: JsonValue) -> SelfOptions
Chain onto the value.
root_label(label: impl Into<SharedString>) -> Self
expanded(paths: impl IntoIterator<Item = SharedString>) -> Self
expanded_paths<S: AsRef<str>>(paths: &[S]) -> Self
selected(path: impl Into<SharedString>) -> Self
visible_rows(rows: usize) -> Self
row_height(height: f32) -> Self
on_toggle(handler: impl Fn(SharedString, bool, &mut Window, &mut App) + 'static) -> Self
on_select(handler: impl Fn(SharedString, &mut Window, &mut App) + 'static) -> SelfQueries
Only answer; they change nothing.
disclosed_paths(cx: &App) -> Vec<SharedString>Rendered by
Each of these compiles and is captured by the gate, so the code behind them is verified rather than written.