Lift a nested `::verification{kind= outcome= scope= observedAtMerkle= ref= observation=}` leaf into a typed [`VerificationRecord`]. Attributes map straight across; missing scalars become empty strings (the gate, not the lift, enforces the closed value sets).
(d: &Directive)
| 213 | /// missing scalars become empty strings (the gate, not the lift, enforces the |
| 214 | /// closed value sets). |
| 215 | fn lift_verification(d: &Directive) -> VerificationRecord { |
| 216 | VerificationRecord { |
| 217 | type_: "VerificationRecord".to_string(), |
| 218 | kind: d.attr("kind").unwrap_or_default().to_string(), |
| 219 | outcome: d.attr("outcome").unwrap_or_default().to_string(), |
| 220 | scope: d.attr("scope").unwrap_or_default().to_string(), |
| 221 | observed_at_merkle: d.attr("observedAtMerkle").unwrap_or_default().to_string(), |
| 222 | reference: d.attr("ref").map(str::to_string), |
| 223 | observation: d.attr("observation").map(str::to_string), |
| 224 | } |
| 225 | } |
| 226 | |
| 227 | fn lift_task(d: &Directive, id_base: &str, n: usize) -> Result<Task> { |
| 228 | let local = |