ed_journals/modules/mixed/models/
mixed_material.rs

1
2
3
4
5
6
7
8
9
10
11
12
13
use serde::{Deserialize, Serialize};

use crate::modules::materials::Material;
use crate::modules::odyssey::Item;

/// In some cases, the game emits events that refer to materials, but can also contain Odyssey
/// items. If that is the case, this model will be used instead.
#[derive(Debug, Serialize, Deserialize, Clone, PartialEq)]
#[serde(untagged)]
pub enum MixedMaterial {
    ShipMaterial(Material),
    OdysseyMaterial(Item),
}