gpui-kit GitHub

Components

PermissionMatrix builder

A grid of subjects against actions.

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

use gpui_kit::agent::PermissionMatrix;

Construct

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

Options

Chain onto the value.

action(action: PermissionAction) -> Self
actions(actions: impl IntoIterator<Item = PermissionAction>) -> Self
subject(subject: PermissionSubject) -> Self
subjects(subjects: impl IntoIterator<Item = PermissionSubject>) -> Self
on_change(handler: impl Fn(PermissionChange, &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/agent/permission.rs