I am apparently too stupid to be able to make a method that returns a Stream of Result<Bytes> from a stream::unfold which does as async read of file chunks because I have no clue why the chunk read needs to be Send and what that even means
AHA! Apparently I can get around this by using `tokio::task::spawn_local` instead of `tokio::spawn` according to this response to a deleted reddit post from two years ago. Yes my life expectancy got reduced a little while trying to figure this out.
https://www.reddit.com/r/rust/comments/10xwg0h/why_does_tokiospawn_require_send/
@mauve I laughed when I saw this post because I have had this same argument with Rust multiple times. Best of luck!
@fabrefact I ended up inlining an async function I was calling until it worked 😅 Diverted into LocalSet for a bit which was less than fruitful
I threw a tokio::sync::mpsc::channel into the mix and did the un-Send-able stuff in a separate task. and it magically works now.