#pattern #early #events #programming #utility #variety #production

eventify

A utility library for variety of event-based programming patterns

1 unstable release

0.1.0-alpha.0 Nov 26, 2023
0.0.0 Nov 21, 2023

#8 in #variety

26 downloads per month
Used in winr

Apache-2.0

16KB
326 lines

eventify

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! ***

Examples

Events

use eventify::event::*;

fn main() {
    let event = Event::new();
    
    let hook = event.hook(|_| {
        println!("Event fired!");
    });
    
    event.emit(&());
}

Properties

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();
}

No runtime deps