Ancestors

Written by Paul Khuong on 2024-11-13 at 14:37

"marks the writer as done" but also CONSUMES THE WRITER BY VALUE!?

https://arrow.apache.org/rust/arrow_array/trait.RecordBatchWriter.html#tymethod.close

=> More informations about this toot | More toots from pkhuong@discuss.systems

Written by Ryan Marcus on 2024-11-13 at 15:41

@pkhuong it makes more sense if you look at an implementation, like FileWriter, which has to do IO for a footer when you call close. I'm not a Rust expert, but I think this is standard practice for handling errors that would otherwise cause Drop to panic.

Although I sort of wish there was a variant that took Box<Self> so you could make dynamic writer objects.

=> More informations about this toot | More toots from ryanmarcus@discuss.systems

Toot

Written by Paul Khuong on 2024-11-13 at 16:48

@ryanmarcus The two implementations I looked at call a non-consuming finish() that would actually be object-safe.

=> More informations about this toot | More toots from pkhuong@discuss.systems

Descendants

Proxy Information
Original URL
gemini://mastogem.picasoft.net/thread/113476667466745076
Status Code
Success (20)
Meta
text/gemini
Capsule Response Time
270.270317 milliseconds
Gemini-to-HTML Time
0.704593 milliseconds

This content has been proxied by September (3851b).