#events #nodejs #js #node #emitter

events_emitter

Rust implementation of Node.JS event

4 releases

0.1.3 Apr 23, 2019
0.1.2 Apr 23, 2019
0.1.1 Apr 23, 2019
0.1.0 Apr 23, 2019

#16 in #emitter

28 downloads per month

MIT license

7KB
79 lines

events_emitter

Rust implementation of Node.JS event

  • Implements most of the interfaces and functions of Node.JS Events.
  • Specific work conditions may vary.

Example

extern crate events_emitter;
use events_emitter::EventEmitter;

let events = EventEmitter::new();
events.on("hello", |x| { println!("{}", x) });
events.emit("hello", "word");
events.remove("hello");

lib.rs:

Rust implementation of Node.JS event

  • Implements most of the interfaces and functions of Node.JS Events.
  • Specific work conditions may vary.

Example

extern crate events_emitter;
use events_emitter::EventEmitter;

let events = EventEmitter::new();
events.on("hello", |x| { println!("{}", x) });
events.emit("hello", "word");
events.remove("hello");

No runtime deps