Skip to content
GitHub no longer supports this web browser. Learn more about the browsers we support.
An experiment of the callbag spec in Rust
Rust
Branch: master
Clone or download
Cannot retrieve the latest commit at this time.
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
src
tests
.gitignore
Cargo.toml
README.md

README.md

callbag.rs 👜

Experimental callbag implementation in Rust 🦀! Currently attempting to implement some of the core basics (see the list below for progress).

pipe!(
    from_iter(0..10),
    map(|x| x * 3),
    filter(|x| x % 2 == 0),
    map(|x| format!("The number is {}", x)),
    for_each(|x| println!("{}", x))
);

Testing

Run tests with cargo test -- --nocapture to see output.

API

The list below shows what's currently implemented/being attempted.

Source factories

  • from_iter
  • interval

Sink factories

  • for_each

Transformation operators

  • map
  • scan
  • flatten

Filtering operators

  • take
  • take_until
  • take_while
  • take_until_interval
  • skip
  • skip_until
  • skip_while
  • filter

Combination operators

  • merge - variadic with macro merge!
  • concat
  • combine - tough one, need to flatten tuples

Utilities

  • pipe - variadic with macro pipe!
You can’t perform that action at this time.