Crates.io | streammap-ext |
lib.rs | streammap-ext |
version | 0.1.0 |
source | src |
created_at | 2022-07-20 13:00:02.699688 |
updated_at | 2022-07-20 13:00:02.699688 |
description | StreamMap of Tokio with altered `next` that returns when stream is dropped |
homepage | https://github.com/metalbear-co/streammap-ext |
repository | https://github.com/metalbear-co/streammap-ext |
max_upload_size | |
id | 628856 |
size | 39,791 |
This is a fork of StreamMap
from tokio-stream
crate.
The only difference between the implementations is that this version of StreamMap next
returns Option<K,Option<V>>
instead of Option<K,V>
. This is to allow the developer to be aware when a stream is being dropped from the StreamMap, without the need to implement a Drop
trait which can be troublesome in some cases (e.g. the drop flow requires async code).
After releasing this crate, I'll open a discussion to consider how to contribute it back to the original crate (as a different name, maybe a PhantomData that marks behavior, or maybe change the current behavior to this).
MIT - Same as source, all copy right goes to Tokio Contributors as this is a fork of tokio-stream
crate.