pub struct ShellRun;Expand description
Shell command processor — runs external CLI tools.
Implementations§
Trait Implementations§
Source§impl NodeProcessor for ShellRun
impl NodeProcessor for ShellRun
Source§fn reserved_tokens(&self) -> &'static [&'static str]
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>
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>
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
fn resolves_items(&self) -> bool
Fills {{item.*}} inside each groups itself, once per file.
Source§fn name(&self) -> &str
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>
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>
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 moreSource§fn validate_raw(&self, raw: &Map<String, Value>) -> Vec<String>
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 moreSource§fn metadata(&self) -> NodeMetadata
fn metadata(&self) -> NodeMetadata
Return the processor’s self-describing metadata. Read more
Source§fn count_keys(&self) -> &'static [&'static str]
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 moreSource§fn declared_params(&self) -> Option<Vec<ParameterDef>>
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§
impl Freeze for ShellRun
impl RefUnwindSafe for ShellRun
impl Send for ShellRun
impl Sync for ShellRun
impl Unpin for ShellRun
impl UnsafeUnpin for ShellRun
impl UnwindSafe for ShellRun
Blanket Implementations§
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
Mutably borrows from an owned value. Read more