resource_cap.rs (1015B)
1 #![forbid(unsafe_code)] 2 3 use radroots_core::{RadrootsCoreDecimal, RadrootsCoreQuantity, RadrootsCoreUnit}; 4 5 use crate::resource_area::RadrootsResourceAreaRef; 6 7 #[cfg(not(feature = "std"))] 8 use alloc::{string::String, vec::Vec}; 9 10 #[cfg_attr(feature = "dto-bindgen", derive(dto_bindgen::Dto))] 11 #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] 12 #[derive(Clone, Debug)] 13 pub struct RadrootsResourceHarvestProduct { 14 pub key: String, 15 pub category: Option<String>, 16 } 17 18 #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] 19 #[derive(Clone, Debug)] 20 pub struct RadrootsResourceHarvestCap { 21 pub d_tag: String, 22 pub resource_area: RadrootsResourceAreaRef, 23 pub product: RadrootsResourceHarvestProduct, 24 pub start: u64, 25 pub end: u64, 26 pub cap_quantity: RadrootsCoreQuantity, 27 pub display_amount: Option<RadrootsCoreDecimal>, 28 pub display_unit: Option<RadrootsCoreUnit>, 29 pub display_label: Option<String>, 30 pub tags: Option<Vec<String>>, 31 }