pub struct Spec {Show 20 fields
pub widgets: Vec<Widget>,
pub out: Option<Vec<QueryOp>>,
pub binds: Vec<Bind>,
pub expects: Vec<Expect>,
pub timeouts: Vec<Timeout>,
pub mouse_binds: Vec<(MouseTrigger, BindAction)>,
pub resize_binds: Vec<BindAction>,
pub spawn: Option<String>,
pub source_file: Option<String>,
pub poll: Option<(String, Duration)>,
pub tests: Vec<TestCase>,
pub spawn_pty: bool,
pub actors: BTreeMap<String, Arc<ActorDef>>,
pub actor_refs: Vec<RefDecl>,
pub row_tracks: Option<Vec<Track>>,
pub col_tracks: Option<Vec<Track>>,
pub gap: u16,
pub flow: Flow,
pub theme: Option<Palette>,
pub theme_off: bool,
}Fields§
§widgets: Vec<Widget>§out: Option<Vec<QueryOp>>Downstream output pipeline (out { … }): applied to the stream and
written to stdout, so arb can modify a pipe, not just visualize it.
binds: Vec<Bind>Key bindings (bind C-<letter> <action>).
expects: Vec<Expect>Event-driven reactions (expect /re/ <action>).
timeouts: Vec<Timeout>Idle reactions (timeout Ns <action>).
mouse_binds: Vec<(MouseTrigger, BindAction)>Mouse reactions (bind <Click> <action>).
resize_binds: Vec<BindAction>Terminal-resize reactions (bind <Resize> <action>).
spawn: Option<String>Input-source command (spawn CMD / spawn { CMD }, SPEC §7): arb
launches CMD via sh -c and feeds its stdout into the stream in place of
stdin (fire-and-forget; child detached, dies with arb). CLI --run wins
if both are given. The interactive send/PTY react leg + .ps.sel
selection widget are deferred. None = read stdin.
source_file: Option<String>Input-source file (< FILE, SPEC §7): read FILE as the stream in place
of stdin. Folded into the producer as cat -- FILE in main. Mutually
exclusive with spawn (and --run). None = read stdin.
poll: Option<(String, Duration)>Poll source (! CMD every Ns, SPEC §7): re-run CMD via sh -c every
interval, feeding each run’s stdout into the stream. The interactive/serve
loop runs in a background thread; the headless path runs CMD once (a
reducer over an endless source can’t terminate). None = read stdin.
tests: Vec<TestCase>In-language unit tests (test "NAME" { given …; run { … }; want … }):
feed sample lines through a query pipeline and assert the output. Run
headlessly by arb --test; ignored by every other mode.
spawn_pty: boolspawn -pty CMD: run the spawn command on a pseudo-terminal (so it acts
interactive) and keep a writer to its stdin for the send action. Only
meaningful with spawn set and in the interactive TUI.
actors: BTreeMap<String, Arc<ActorDef>>actor NAME(state) { on MSG { … } } declarations, by name. A via NAME
pipeline op resolves against this registry at build time (SPEC §15).
actor_refs: Vec<RefDecl>spawn NAME = ACTOR(init) / pool NAME = ACTOR * N session bindings, in
declaration order. The TUI spawns these once at startup; tell/ask bind
actions drive them (SPEC §15).
row_tracks: Option<Vec<Track>>rows "1 2 1" — the grid’s row track sizes (None = uniform). A track is
N (fixed cells), N% (percentage), or N*/* (weight, proportional).
col_tracks: Option<Vec<Track>>cols "20 * 2*" — the grid’s column track sizes (None = uniform).
gap: u16gap N — blank cells between grid rows/columns (default 0).
flow: Flowlayout horizontal|vertical — the no-grid auto-tile direction (default
vertical). Ignored once any widget declares a grid cell.
theme: Option<Palette>theme NAME / theme custom c1..c6 — the active color palette (one of the
31 built-ins or a custom 6-index palette). None = no directive: main
resolves the default (--theme → ~/.arb config → baked neon-sprawl).
theme_off: booltheme off/none — opt out of theming to the classic cyan scheme; stops
main from applying the config/baked default.
Trait Implementations§
Auto Trait Implementations§
impl Forget for Spec
impl Freeze for Spec
impl Move for Spec
impl RefUnwindSafe for Spec
impl Send for Spec
impl Sync for Spec
impl Unpin for Spec
impl UnsafeUnpin for Spec
impl UnwindSafe for Spec
Blanket Implementations§
Source§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
Source§type ArchivedMetadata = ()
type ArchivedMetadata = ()
Source§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<F, W, T, D> Deserialize<With<T, W>, D> for F
impl<F, W, T, D> Deserialize<With<T, W>, D> for F
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more