Crates.io | eventify |
lib.rs | eventify |
version | 0.1.0-alpha.0 |
source | src |
created_at | 2023-11-21 15:18:26.577757 |
updated_at | 2023-11-26 23:36:14.324019 |
description | A utility library for variety of event-based programming patterns. |
homepage | |
repository | https://github.com/jacobrgreen114/eventify-rs |
max_upload_size | |
id | 1044327 |
size | 27,925 |
A utility library for variety of event-based programming patterns.
*** Eventify is still in early development, and is not yet ready for use in production! ***
use eventify::event::*;
fn main() {
let event = Event::new();
let hook = event.hook(|_| {
println!("Event fired!");
});
event.emit(&());
}
use eventify::property::*;
fn main() {
let property = Property::new("".to_string());
let binding = property.bind(|value| {
println!("Property changed to: {}", value);
});
*property.write().unwrap() = "Hello, world!".to_string();
}