What am I doing wrong here?

That’s also wrong, and would be a compile error, as you’re still throwing away the File.Writer (more complete explanation here).

Correct version:

var file_writer = output_file.writer(&buffer);
const interface = &file_writer.interface;

Relevant thread:

1 Like