#write #seek #another #operation #store #apply #trying

yadon

Write + Seek which stores operations and can later apply them to another Write + Seek

1 unstable release

0.1.1 Sep 19, 2021
0.1.0 Sep 19, 2021

#13 in #trying

MIT/Apache

45KB
305 lines

yadon

picture of the Pokémon Slowpoke, whose original Japanese name is Yadon

why write now, when you can write later?

Yadon is a struct which implements Write + Seek but doesn't actually write anything until later, when you call .apply().

why

yes I was trying to push a generic write operation using binrw through a channel to be actually performed on another thread, and being able to store the result of the write operation meant I sidestepped some particularly hairy issues where I would have had to store trait objects which had an associated generic function - impossible since having that associated generic function made the entire trait not 'object safe'.

Dependencies

~260–720KB
~17K SLoC