rust_event_listener

Crates.iorust_event_listener
lib.rsrust_event_listener
version0.1.0
sourcesrc
created_at2022-03-10 20:11:53.921056
updated_at2022-03-10 20:11:53.921056
descriptionNodeJS like Event Listener library for rust!
homepage
repositoryhttps://github.com/behemehal/rust_event_listener
max_upload_size
id547815
size29,677
Ahmetcan Aksu (ahmtcn123)

documentation

https://docs.rs/rust_event_listener

README

Rust Event Listener

Crates.io Version Documentation

NodeJS like Event Listener library for rust!

    //Create new emitter
    let mut emitter = EventListener::new();

    //Set max listeners
    emitter.set_max_listeners(10);

    //Add listener
    emitter.on("test", Box::new(|name, d| {
        println!("Emited: {} {:#?}", name, d);
    }));

    emitter.emit("test", 1);

Examples

You can find examples here

Commit count: 3

cargo fmt