| Crates.io | sssignals |
| lib.rs | sssignals |
| version | 0.2.1 |
| created_at | 2023-11-01 11:38:01.157233+00 |
| updated_at | 2023-11-04 19:14:38.168226+00 |
| description | π Simple, Synchronous Reactive Signals for Rust |
| homepage | |
| repository | https://github.com/Brian3647/sssignals |
| max_upload_size | |
| id | 1020905 |
| size | 10,755 |
SSSignals is a lightweight Rust library that provides simple, synchronous reactive signals. Signals are a powerful way to react to changes in values and design event-driven systems. With SSSignals, you can easily incorporate reactive programming into your Rust applications.
[Request a feature/Report a bug]
Display, Debug, and Default.use sssignals::Signal;
fn main() {
let mut signal = Signal::new(42);
signal.on_change(|new, old| {
println!("Value changed from {} to {}", old, new);
});
signal.set(43); // Prints "Value changed from 42 to 43"
println!("{}", signal); // Prints "Signal(43)"
}
Run cargo add sssignals or add the following to your Cargo.toml file:
[dependencies]
sssignals = "*"
For detailed information on how to use SSSignals, please refer to the official documentation.
We welcome contributions from the open-source community. If you'd like to report a bug, request a feature, or contribute to the project, you can use the set templates.
This project is licensed under the MIT License - see the LICENSE file for details.