https://github.com/metalbear-co/streammap-ext
Alternative StreamMap fork of tokio-stream
https://github.com/metalbear-co/streammap-ext
Last synced: 23 days ago
JSON representation
Alternative StreamMap fork of tokio-stream
- Host: GitHub
- URL: https://github.com/metalbear-co/streammap-ext
- Owner: metalbear-co
- License: other
- Created: 2022-07-19T15:10:50.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2022-07-20T12:58:48.000Z (almost 3 years ago)
- Last Synced: 2025-03-28T08:39:35.559Z (about 1 month ago)
- Language: Rust
- Size: 21.5 KB
- Stars: 5
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG
- License: LICENSE
Awesome Lists containing this project
README
# streammap-ext
This is a fork of `StreamMap` from `tokio-stream` [crate](https://github.com/tokio-rs/tokio/blob/master/tokio-stream/src/stream_map.rs).
The only difference between the implementations is that this version of StreamMap `next` returns `Option>` instead of `Option`. 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).
# LICENSE
MIT - Same as source, all copy right goes to Tokio Contributors as this is a fork of `tokio-stream` crate.