Rust "should be obvious, but isn't" question. I have an object which is a Future...

@mcc@mastodon.social

Rust "should be obvious, but isn't" question.

I have an object which is a Futures Stream/Sink. It isn't Clone or Copy. I want to set it up in an async loop where it receives data from the Stream and acts on it. Meanwhile, I want other asynchronous code to send data to the Sink.

It doesn't work. `while let Some(value) = streamsink.next().await` requires me to borrow streamsink mutably. Then when other code wants to send it, it's already borrowed. The Refcell panics.

(1/2)