GPUI Box GitHub

Components

DiagnosticsList builder

A diagnostic list whose data and state remain owned by its caller.

A builder is RenderOnce. Construct and mount it in one expression.

use gpui_kit::data::DiagnosticsList;

Construct

new(ident: impl Into<Ident>, diagnostics: Loadable<Vec<Diagnostic>, SharedString>) -> Self

Options

Chain onto the value.

filter(filter: DiagnosticFilter) -> Self
selected(id: impl Into<SharedString>) -> Self
visible_rows(rows: usize) -> Self
on_filter(handler: impl Fn(DiagnosticFilter, &mut Window, &mut App) + 'static) -> Self
on_select(handler: impl Fn(SharedString, &mut Window, &mut App) + 'static) -> Self
on_action(handler: impl Fn(SharedString, SharedString, &mut Window, &mut App) + 'static) -> Self
on_retry(handler: impl Fn(&mut Window, &mut App) + 'static) -> Self

Rendered by

Each of these compiles and is captured by the gate, so the code behind them is verified rather than written.

Source: crates/gpui-kit/src/data/diagnostics_list.rs