use-event-envelope 0.1.0

Generic event envelope composed from RustUse event primitives.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use use_event_envelope::EventEnvelope;
use use_event_kind::EventKind;
use use_event_name::EventName;
use use_event_source::EventSource;

#[test]
fn builds_event_envelope() {
    let event = EventEnvelope::new(
        EventName::new("command.started"),
        EventKind::Started,
        EventSource::new("cli"),
        "rustuse build",
    );

    assert_eq!(event.name.as_str(), "command.started");
    assert_eq!(event.kind, EventKind::Started);
    assert_eq!(event.source.as_str(), "cli");
}