pub struct Parameters(/* private fields */);Expand description
A named collection of Params bound to an operation’s declared inputs.
Callers build Parameters through the params! macro when adding a
step or a return block. Draft-time validation uses Param::get_references
to walk every contained parameter and check that all references resolve;
at runtime, resolution turns each Param into a StoreEntry keyed by
"{step_name}.{input_name}" in the runtime store.
Implementations§
Source§impl Parameters
impl Parameters
Sourcepub fn new(map: HashMap<String, Param>) -> Self
pub fn new(map: HashMap<String, Param>) -> Self
Wraps a ready-built map of named parameters. Prefer the params!
macro in user code.
Sourcepub fn get(&self, key: &str) -> Option<&Param>
pub fn get(&self, key: &str) -> Option<&Param>
Returns the parameter bound to the given input name, or None if
the name is not bound.
Sourcepub fn iter(&self) -> impl Iterator<Item = (&String, &Param)>
pub fn iter(&self) -> impl Iterator<Item = (&String, &Param)>
Iterates over (input_name, param) pairs.
Sourcepub fn resolve_in_store(
&self,
prefix_part: impl Into<String>,
store: &mut Store<StoreEntry>,
) -> Result<String, OperationError>
pub fn resolve_in_store( &self, prefix_part: impl Into<String>, store: &mut Store<StoreEntry>, ) -> Result<String, OperationError>
Resolves every parameter against store and writes each result back
into the same store under "{prefix_part}.{input_name}". Returns
the prefix for use by the caller.
Sourcepub fn resolve_to_store(
&self,
prefix_part: impl Into<String>,
src: &Store<StoreEntry>,
dst: &mut Store<StoreEntry>,
) -> Result<(), OperationError>
pub fn resolve_to_store( &self, prefix_part: impl Into<String>, src: &Store<StoreEntry>, dst: &mut Store<StoreEntry>, ) -> Result<(), OperationError>
Resolves every parameter against src and writes each result into
dst under "{prefix_part}.{input_name}". Used when the source
and destination stores differ — for example, when resolving a
return block’s parameters against the pipeline’s variables store
and placing the results in a fresh returns store.
Trait Implementations§
Source§impl Clone for Parameters
impl Clone for Parameters
Source§fn clone(&self) -> Parameters
fn clone(&self) -> Parameters
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more