Skip to content

listLiteral

listLiteral(items): InstructionArg

Defined in: ootle/src/helpers/cbor-literal.ts:368

CBOR-encode a list of already-encoded values as one array. This is the shape of a Rust Vec<T>, a tuple, and a struct: minicbor writes a struct as the array of its fields in #[n(i)] order.

For a struct, pass noneLiteral for an unset Option field and for any index the struct skips, and leave trailing unset fields out, as the Rust encoder does.

InstructionArg[]

InstructionArg

if an item is not a Literal (a workspace or blob reference cannot be nested inside a value).