ed_journals/modules/journal/models/
journal_event_kind.rs

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
use crate::backpack::Backpack;
use crate::logs::LogEvent;
use crate::market::Market;
use crate::modules::cargo::Cargo;
use crate::modules::outfitting::Outfitting;
use crate::modules_info::ModulesInfo;
use crate::nav_route::NavRoute;
use crate::ship_locker::ShipLocker;
use crate::shipyard::Shipyard;
use crate::status::Status;
use serde::Serialize;

/// This event is fired from the [LiveJournalDirReader] when any change happens in the journal
/// directory and includes all the possible models that could have been updated.
#[derive(Debug, Serialize, Clone, PartialEq)]
// The large enum variant is allowed here as this is usually allocated by the reader anyway and
// adding another box here wouldn't be that useful. Also even though it's large, it's not huge.
#[allow(clippy::large_enum_variant)]
pub enum JournalEventKind {
    LogEvent(LogEvent),
    StatusEvent(Status),
    OutfittingEvent(Outfitting),
    ShipyardEvent(Shipyard),
    MarketEvent(Market),
    NavRoute(NavRoute),
    ModulesInfo(ModulesInfo),
    Backpack(Backpack),
    Cargo(Cargo),
    ShipLocker(ShipLocker),
}