MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / lift_verification

Function lift_verification

atomic-canonical/src/lift.rs:215–225  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

213/// missing scalars become empty strings (the gate, not the lift, enforces the
214/// closed value sets).
215fn 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
227fn lift_task(d: &Directive, id_base: &str, n: usize) -> Result<Task> {
228 let local =

Callers

nothing calls this directly

Calls 1

attrMethod · 0.80

Tested by

no test coverage detected