pub struct StepInfo {
pub id: StepId,
pub role: Option<RoleId>,
pub backend: Option<String>,
pub produces: Option<ArtifactId>,
pub typed_inputs: Option<StepInputs>,
}Expand description
Information about a step needed by action handlers.
This is a subset of Step containing only what handlers need:
- Step ID (for error messages)
- Role (for attestation)
- Backend (for cryptographic operations)
- Produces (for artifact storage)
- Typed inputs (pre-resolved artifact references)
Constructed from Step by the executor before calling handlers.
Fields§
§id: StepIdStep identifier (for error messages).
role: Option<RoleId>Role that performs this step (for attestation).
backend: Option<String>Backend to use for this step (if action requires one).
produces: Option<ArtifactId>Artifact ID this step produces (if any).
typed_inputs: Option<StepInputs>Pre-resolved input artifact references.
Handlers can access artifact IDs directly without parsing ${...} strings.
Implementations§
Source§impl StepInfo
impl StepInfo
Sourcepub fn new(
id: StepId,
role: Option<RoleId>,
backend: Option<String>,
produces: Option<ArtifactId>,
typed_inputs: Option<StepInputs>,
) -> Self
pub fn new( id: StepId, role: Option<RoleId>, backend: Option<String>, produces: Option<ArtifactId>, typed_inputs: Option<StepInputs>, ) -> Self
Create a new StepInfo from Step fields.
Sourcepub fn named_input(&self, key: &str) -> Option<&ArtifactRef>
pub fn named_input(&self, key: &str) -> Option<&ArtifactRef>
Look up a named input by key, returning None if missing or if the
step uses a single (positional) input.
Sourcepub fn required_named_input(
&self,
key: &str,
action: &'static str,
) -> Result<&ArtifactRef, ActionError>
pub fn required_named_input( &self, key: &str, action: &'static str, ) -> Result<&ArtifactRef, ActionError>
Look up a required named input, returning a uniform ActionError
when the input is missing.
§Errors
Returns ActionError::Failed if the input is missing or if the
step uses a single (positional) input.
Sourcepub fn required_named_inputs(
&self,
key: &str,
action: &'static str,
) -> Result<&[ArtifactRef], ActionError>
pub fn required_named_inputs( &self, key: &str, action: &'static str, ) -> Result<&[ArtifactRef], ActionError>
Look up a named input that holds a list, in the order written,
returning a uniform ActionError when it is missing or holds one
reference instead.
§Errors
Returns ActionError::Failed if the input is missing, is not a
list, or if the step uses a single (positional) input.