rustVecU8 static method

CustomLayout rustVecU8([
  1. String? property
])

Rust vector values

Implementation

static CustomLayout rustVecU8([String? property]) {
  final length = u32('length');
  final layout = struct([
    length,
    u32('lengthPadding'),
    blob(offset(length, -8), property: 'data'),
  ]);
  return CustomLayout(
    layout: layout,
    encoder: (data) => {"data": data},
    decoder: (data) => data["data"],
    property: property,
  );
}