Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/yingdev/rxrs
Reactive Extensions for Rust
https://github.com/yingdev/rxrs
Last synced: about 21 hours ago
JSON representation
Reactive Extensions for Rust
- Host: GitHub
- URL: https://github.com/yingdev/rxrs
- Owner: yingDev
- Created: 2018-03-01T17:52:59.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2018-11-20T17:09:20.000Z (about 6 years ago)
- Last Synced: 2024-04-24T04:46:11.443Z (8 months ago)
- Language: Rust
- Size: 1.16 MB
- Stars: 121
- Watchers: 14
- Forks: 3
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
RxRs - Reactive Extensions for Rust
__WIP: rxrs is under heavy development & not ready for production__
```rust
use rxrs::*;#[test]
pub fn greet()
{
let output = RefCell::new(String::new());let subj = Rc::new(Subject::::new());
let evens: impl Observable> = subj.clone()
.filter(|v:&_| v%2 == 0 )
.take(4)
.map(|v:&_| format!("*{}", v));evens.subscribe(
|v: String| output.borrow_mut().push_str(&v),
|e| output.borrow_mut().push_str("ok")
);for i in 0..10 {
subj.next(i);
}assert_eq!("*0*2*4*6ok", &*output.borrow());
}```
```bash
src
├── by.rs
├── error.rs
├── fac
│ ├── iter.rs
│ ├── merge.rs
│ ├── mod.rs
│ ├── of.rs
│ └── timer.rs
├── lib.rs
├── observable.rs
├── observer.rs
├── op
│ ├── filter.rs
│ ├── map.rs
│ ├── merge.rs
│ ├── mod.rs
│ ├── skip.rs
│ ├── start.rs
│ ├── take.rs
│ └── until.rs
├── scheduler
│ ├── current_thread_scheduler.rs
│ ├── event_loop_scheduler.rs
│ ├── mod.rs
│ └── new_thread_scheduler.rs
├── subject
│ ├── behavior_subject.rs
│ ├── mod.rs
│ └── subject.rs
├── sync
│ ├── act.rs
│ ├── any_send_sync.rs
│ ├── mod.rs
│ ├── re_spin_lock.rs
│ ├── re_spin_mutex.rs
│ ├── recur_cell.rs
│ ├── ss_mark.rs
│ └── yesno.rs
├── unsub.rs
└── util
├── clones.rs
└── mod.rs```