Skip to main content

Spec

Struct Spec 

Source
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: bool

spawn -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: u16

gap N — blank cells between grid rows/columns (default 0).

§flow: Flow

layout 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: bool

theme off/none — opt out of theming to the classic cyan scheme; stops main from applying the config/baked default.

Trait Implementations§

Source§

impl Debug for Spec

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for Spec

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

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> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> ArchivePointee for T

Source§

type ArchivedMetadata = ()

The archived version of the pointer metadata for this type.
Source§

fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata

Converts some archived metadata to the pointer metadata for itself.
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<F, W, T, D> Deserialize<With<T, W>, D> for F
where W: DeserializeWith<F, T, D>, D: Fallible + ?Sized, F: ?Sized,

Source§

fn deserialize( &self, deserializer: &mut D, ) -> Result<With<T, W>, <D as Fallible>::Error>

Deserializes using the given deserializer
Source§

impl<T> Downcast for T
where T: Any,

Source§

fn into_any(self: Box<T>) -> Box<dyn Any>

Convert 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>

Convert 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)

Convert &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)

Convert &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
where T: Any + Send + Sync,

Source§

fn into_any_arc(self: Arc<T>) -> Arc<dyn Any + Sync + Send> ⓘ

Convert Arc<Trait> (where Trait: Downcast) to Arc<Any>. Arc<Any> can then be further downcast into Arc<ConcreteType> where ConcreteType implements Trait.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ

Converts 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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
where F: FnOnce(&Self) -> bool,

Converts 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
Source§

impl<T> LayoutRaw for T

Source§

fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>

Gets the layout of the type.
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Pointee for T

Source§

type Metadata = ()

The type for metadata in pointers and references to Self.
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more