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

Function lift_verification

atomic-canonical/src/lift.rs:191–201  ·  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

189/// missing scalars become empty strings (the gate, not the lift, enforces the
190/// closed value sets).
191fn lift_verification(d: &Directive) -> VerificationRecord {
192 VerificationRecord {
193 type_: "VerificationRecord".to_string(),
194 kind: d.attr("kind").unwrap_or_default().to_string(),
195 outcome: d.attr("outcome").unwrap_or_default().to_string(),
196 scope: d.attr("scope").unwrap_or_default().to_string(),
197 observed_at_merkle: d.attr("observedAtMerkle").unwrap_or_default().to_string(),
198 reference: d.attr("ref").map(str::to_string),
199 observation: d.attr("observation").map(str::to_string),
200 }
201}
202
203fn lift_task(d: &Directive, id_base: &str, n: usize) -> Task {
204 let local =

Callers

nothing calls this directly

Calls 1

attrMethod · 0.80

Tested by

no test coverage detected