Get the length of the array.
| 50 | |
| 51 | /// Get the length of the array. |
| 52 | Result<uint32_t> len(Store::Context cx) const { |
| 53 | uint32_t out; |
| 54 | auto *err = wasmtime_arrayref_len(cx.capi(), &raw, &out); |
| 55 | if (err) |
| 56 | return Result<uint32_t>(Error(err)); |
| 57 | return Result<uint32_t>(out); |
| 58 | } |
| 59 | |
| 60 | /// Read an element from the array. |
| 61 | Result<Val> get(Store::Context cx, uint32_t index) const; |