gpui-kit GitHub

Components

GraphNode builder

A step of a run, as a card on the canvas.

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

use gpui_kit::canvas::GraphNode;

Construct

new(ident: impl Into<Ident>, title: impl Into<SharedString>) -> Self

Options

Chain onto the value.

action(action: impl Into<SharedString>) -> Self
state(state: NodeState) -> Self
metric(label: impl Into<SharedString>, value: impl Into<SharedString>) -> Self
metrics(metrics: impl IntoIterator<Item = NodeMetric>) -> Self
diff(diff: Diff) -> Self
width(width: f32) -> Self
on_click(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/canvas/node.rs