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
48
49
50
51
use crateEvent;
/// Abstractly represents an entity capable of sending any type of event to the bus.
///
/// `Bus` implements this Trait because it can route events to the corresponding
/// internal publisher based on the event's type.
/// Abstractly represents an entity capable of sending a **specific** event type.
///
/// For example, [`Publisher<E>`] and the Emitter [variant](crate::chain::WithStep) of
/// the `Chain` structure implement this Trait.
/// Abstractly represents an entity that can be drained.
///
/// When `drain` is called, the entity must block until all underlying tasks and
/// resources have been cleaned up.
///
/// **Note:** This method usually consumes `self` to ensure no new operations
/// are initiated during the draining process.
/// Abstractly represents an entity that can be closed.
///
/// `Close` is typically a safer, conditional version of `Drain`.
/// In `evno`, `Bus::close()` only performs a full drain if it is the last reference.
///
/// **Note:** This method consumes `self`.