pub fn from_scheme_instances<'a, A, I, F>(
instances: I,
to_arg: F,
) -> ValueAssignment<A>where
A: Eq + Hash + Clone,
I: IntoIterator<Item = (&'a SchemeInstance, &'a HashMap<String, String>)>,
F: Fn(&SchemeInstance) -> A,Expand description
Extract value promotions from an iterator of instantiated schemes using the default catalog’s values-scheme name.
For each scheme instance:
- If
instance.scheme_name == "Argument from Values"and a"value"binding is present, the scheme’s conclusion is mapped to the bound value. - Otherwise, the scheme is skipped silently.
to_arg converts a SchemeInstance to the caller’s argument label
type — typically by reading the conclusion literal. For encounter use
this is a closure producing an ArgumentId from instance.conclusion.
Bindings are passed in separately because SchemeInstance does not
retain its bindings post-instantiation — only the resolved literals.
Callers must keep the original bindings alongside each instance.