2 releases
0.1.1 | Mar 14, 2024 |
---|---|
0.1.0 | Feb 13, 2024 |
#706 in Procedural macros
63 downloads per month
6KB
103 lines
MutableX
Create X-sized mutable signals for FutureSignals.
Usage
From tests/basic.rs
#[cfg(test)]
pub mod test {
use futures_signals::signal::{Mutable, SignalExt};
use mutablex::mutable_x;
#[test]
pub fn basic() {
mutable_x!(2);
let stream_a = Mutable::new(1);
let stream_b = Mutable::new(2);
let combination = Mutable2::new(stream_a.clone(), stream_b.clone());
let _ = combination.map(|(a, b)| {
println!("{} {}", a, b);
});
stream_a.set(3);
stream_b.set(4);
}
}
Dependencies
~1.5–2.3MB
~46K SLoC