Skip to main content

ShellRun

Struct ShellRun 

Source
pub struct ShellRun;
Expand description

Shell command processor — runs external CLI tools.

Implementations§

Source§

impl ShellRun

Source

pub fn new() -> Self

Trait Implementations§

Source§

impl Default for ShellRun

Source§

fn default() -> Self

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

impl NodeProcessor for ShellRun

Source§

fn reserved_tokens(&self) -> &'static [&'static str]

Filled after the executor, by shell-run itself (SEC-27).

Source§

fn process( &self, input: NodeInput, progress: &ProgressReporter, ctx: &dyn ProcessContext, ) -> Result<NodeOutput, BntoError>

Run with no incoming files (a direct call, not through the executor).

Source§

fn process_batch( &self, input: BatchInput, progress: &ProgressReporter, ctx: &dyn ProcessContext, ) -> Result<NodeOutput, BntoError>

Run once with every incoming file, for each groups in args. The files never reach the command otherwise, and the output is named after the command alone, as when the node had no input.

Source§

fn resolves_items(&self) -> bool

Fills {{item.*}} inside each groups itself, once per file.

Source§

fn name(&self) -> &str

The processor’s type key (e.g., “image-compress”). Must match the key used in registry.register(). Convention: category-operation, kebab-case.
Source§

fn validate(&self, params: &Map<String, Value>) -> Vec<String>

Validate the input parameters before processing. Read more
Source§

fn platform_problems( &self, params: &Map<String, Value>, platforms: &[&str], ) -> Vec<String>

Problems the params cause on some of the platforms the step can run on: the values {{ctx.platform}} may read there (macos, linux, windows, unknown), narrowed by the platform guards on its path. bnto check reports them (shell-run’s Windows-only powershell). Read more
Source§

fn validate_raw(&self, raw: &Map<String, Value>) -> Vec<String>

Problems in the params as the recipe wrote them, before any template is filled — what validate can’t see once data is in, such as a data placeholder in a param that must be literal. The executor refuses the run on any, before a step starts; bnto check reports them. Read more
Source§

fn metadata(&self) -> NodeMetadata

Return the processor’s self-describing metadata. Read more
Source§

fn count_keys(&self) -> &'static [&'static str]

Keys of the node-level NodeOutput.metadata that count something per call (e.g. files copied). When the node runs more than once — a per-file node over several files, a loop’s iterations — the executor adds these up in the node’s record instead of keeping the last call’s value. Read more
Source§

fn declared_params(&self) -> Option<Vec<ParameterDef>>

The params a run accepts for this node: its metadata’s, or None when the processor keeps the placeholder metadata() above (test mocks), which declares nothing. A run refuses any other param.

Auto Trait Implementations§

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> 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<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

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, 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.