fixedSizeBcsType<T, Input> function

BcsType<T, Input> fixedSizeBcsType<T, Input>({
  1. required String name,
  2. required int size,
  3. required T read(
    1. BcsReader
    ),
  4. required void write(
    1. Input,
    2. BcsWriter
    ),
  5. void validate(
    1. Input
    )?,
})

Implementation

BcsType<T, Input> fixedSizeBcsType<T, Input>({
  required String name,
  required int size,
  required T Function(BcsReader) read,
  required void Function(Input, BcsWriter) write,
  void Function(Input)? validate,
}) {
  return BcsType<T, Input>(
    name: name,
    read: read,
    write: write,
    serializedSize: (_, {BcsWriterOptions? options}) => size,
    validate: validate,
  );
}