fixedSizeBcsType<T, Input> function
BcsType<T, Input>
fixedSizeBcsType<
T, Input>({ - required String name,
- required int size,
- required T read(
- BcsReader
),
- required void write(
- Input,
- BcsWriter
),
- void validate(
- 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,
);
}