1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
//! This library is intended to be used by tools, such as cli's, which have multiple user interface
//! options, through which they can communicate, while also having various separate commands (or
//! flows) which require each to carefully specify their own output formatting.
//!
//! The library consists of three primary building blocks, and a default implementation on top
//! of these building blocks.
//!
//! The three building blocks are:
//! * [`EventHandler`]: The event handler receives an event (our message type) as input,
//! and decides what to do with this message. Examples include a json-lines handler which
//! prints events to to stderr, a progress bar, a faked handler which collects events for
//! which may be asserted on in software tests, or a handler which sends websocket messages
//! for each event.
//!
//! * [`EventReporter`]: Used to communicate messages to a user.
//! * [`EventListener`]: Receives the messages, send by a reporter and runs the `EventHandler`
//! where appropriate.
//!
//! On top of these building blocks, a channel based implementation is provided which runs the `EventHandler`
//! in a separate thread.
//! To use this implementation, consult the docs for the [`ChannelReporter`],
//! and the [`ChannelEventListener`].
//!
//! [`EventHandler`]: crate::EventHandler
//! [`EventReporter`]: crate::EventReporter
//! [`EventListener`]: `crate::EventListener`
//! [`ChannelReporter`]: crate::ChannelReporter
//! [`ChannelEventListener`]: crate::ChannelEventListener
pub use ;
pub use EventHandler;
pub use ;
pub use EventReporter;