Count[A: Any val]¶
Read a count field, then decode that many instances of the body codec.
On encode, write the array length as the count, then encode each element. The count field is structural — it does not appear in the decoded type.
Implements¶
Constructors¶
create¶
Parameters¶
Returns¶
- Count[A] val^
Public Functions¶
decode¶
Decode a count followed by that many elements.
fun box decode(
data: Array[U8 val] val,
offset: USize val)
: ((Array[A] val , USize val) | DecodeError)
Parameters¶
Returns¶
- ((Array[A] val , USize val) | DecodeError)
encode¶
Parameters¶
- value: Array[A] val
Returns¶
- (Array[U8 val] val | EncodeError)