pub struct StepRequest {
pub inputs: Vec<Artifact>,
pub output_dir: PathBuf,
pub from: String,
pub to: String,
pub operation: String,
pub limits: Limits,
pub params: BTreeMap<String, String>,
pub spent_output_bytes: u64,
}Expand description
One adapter invocation. Adapters must write only inside output_dir, must
not change inputs, and must return at least one regular file on success.
The engine creates the output directory before calling the adapter. The adapter is responsible for validating operation-specific inputs, observing limits, and keeping blocking work off the asynchronous executor. The engine checks returned files but does not enforce every part of this contract; in particular, it currently accepts an empty output vector.
Fields§
§inputs: Vec<Artifact>Ordered staged inputs or outputs from the preceding step; do not mutate them.
output_dir: PathBufExisting private step directory where the adapter must create outputs.
from: StringConcrete source format ID, not a filename extension or wildcard.
to: StringConcrete target format ID that every returned artifact must declare.
operation: StringAdapter-specific operation ID copied from the selected conversion edge.
limits: LimitsResource budgets for this invocation; see Limits for enforcement scope.
params: BTreeMap<String, String>Quality knobs copied from ConversionOptions::params.
Keys are adapter-defined names such as quality; the reserved key
quality carries a 0-100 integer string and should be mapped onto the
closest native encoder control. Adapters must ignore unknown keys and
must never treat these values as paths or shell input.
spent_output_bytes: u64Cumulative bytes the engine has already validated across earlier steps
of the current route, used with Limits::max_total_output_bytes.
Implementations§
Source§impl StepRequest
impl StepRequest
Sourcepub fn new(
inputs: Vec<Artifact>,
output_dir: impl Into<PathBuf>,
from: impl Into<String>,
to: impl Into<String>,
operation: impl Into<String>,
limits: Limits,
) -> Self
pub fn new( inputs: Vec<Artifact>, output_dir: impl Into<PathBuf>, from: impl Into<String>, to: impl Into<String>, operation: impl Into<String>, limits: Limits, ) -> Self
Build a request with no params and no prior output spend.
Sourcepub fn with_params(self, params: &BTreeMap<String, String>) -> Self
pub fn with_params(self, params: &BTreeMap<String, String>) -> Self
Attach quality params; see Self::params.
Sourcepub fn with_spent_output_bytes(self, spent: u64) -> Self
pub fn with_spent_output_bytes(self, spent: u64) -> Self
Record cumulative earlier-step output bytes; see Self::spent_output_bytes.