MCPcopy Create free account
hub / github.com/argumentcomputer/ix / decode_u64_array

Function decode_u64_array

crates/ffi/src/lean_ixon/expr.rs:10–21  ·  view source on GitHub ↗

Decode Array UInt64 from Lean.

(obj: LeanArray<LeanBorrowed<'_>>)

Source from the content-addressed store, hash-verified

8
9/// Decode Array UInt64 from Lean.
10fn decode_u64_array(obj: LeanArray<LeanBorrowed<'_>>) -> Vec<u64> {
11 obj
12 .iter()
13 .map(|elem| {
14 if elem.is_scalar() {
15 elem.unbox_usize() as u64
16 } else {
17 elem.unbox_u64()
18 }
19 })
20 .collect()
21}
22
23impl LeanIxonExpr<LeanOwned> {
24 /// Build Ixon.Expr (12 constructors and wire categories).

Callers 1

decodeMethod · 0.70

Calls 1

iterMethod · 0.45

Tested by

no test coverage detected