kanal
kanal copied to clipboard
`Stream` that take ownership of the `Receiver`
Hello, thank you very much for this crate. Exactly what I need for my application. I would like to ask:
How expensive to create one ReceiveStream
from Receiver
?
If that is expensive, can you provide something like tokio ReceiverStream which takes the ownership of Receiver
since axum::body::Body::from_stream
requires an owned stream.
Hi, thanks for your kind words. I might consider implementing it in the future. For current ReceiveStream
cost is same as single Box allocation and for owned stream performance should be around cloning the channel instance itself + Box allocation, Pull requests are welcome.