diff options
| author | 魏曹先生 <1992414357@qq.com> | 2026-02-25 09:50:53 +0800 |
|---|---|---|
| committer | 魏曹先生 <1992414357@qq.com> | 2026-02-25 09:50:53 +0800 |
| commit | b1509e9ecac1f28daefd7cb1078176d47d585252 (patch) | |
| tree | 38398a783e79a1351cc06acadea2de64dfd969a5 /systems/sheet/src/mapping.rs | |
| parent | ce7222fbde5b260508e350afd5f17b5e635ede76 (diff) | |
Add serde derive to sheet system structs
Diffstat (limited to 'systems/sheet/src/mapping.rs')
| -rw-r--r-- | systems/sheet/src/mapping.rs | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/systems/sheet/src/mapping.rs b/systems/sheet/src/mapping.rs index 1743534..b2acaa7 100644 --- a/systems/sheet/src/mapping.rs +++ b/systems/sheet/src/mapping.rs @@ -1,4 +1,5 @@ use just_fmt::fmt_path::{PathFormatConfig, fmt_path_str, fmt_path_str_custom}; +use serde::{Deserialize, Serialize}; use crate::{index_source::IndexSource, mapping::error::ParseMappingError}; @@ -11,7 +12,7 @@ pub mod error; /// Local mapping /// It is stored inside a Sheet and will be exposed externally as Mapping or MappingBuf -#[derive(Debug, Clone)] +#[derive(Debug, Clone, Serialize, Deserialize)] pub struct LocalMapping { /// The value of the local mapping val: Vec<String>, @@ -25,7 +26,7 @@ pub struct LocalMapping { /// The forward direction of the current Mapping /// It indicates the expected asset update method for the current Mapping -#[derive(Default, Debug, PartialEq, Eq, Clone)] +#[derive(Default, Debug, PartialEq, Eq, Clone, Serialize, Deserialize)] pub enum LocalMappingForward { /// Expect the current index version to be the latest #[default] @@ -51,7 +52,7 @@ pub struct Mapping<'a> { /// MappingBuf /// It stores complete mapping information and participates in complex mapping editing operations like storage and modification -#[derive(Debug, PartialEq, Clone)] +#[derive(Debug, PartialEq, Clone, Serialize, Deserialize)] pub struct MappingBuf { sheet_name: String, val: Vec<String>, |
