From b1509e9ecac1f28daefd7cb1078176d47d585252 Mon Sep 17 00:00:00 2001 From: 魏曹先生 <1992414357@qq.com> Date: Wed, 25 Feb 2026 09:50:53 +0800 Subject: Add serde derive to sheet system structs --- systems/sheet/src/mapping.rs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'systems/sheet/src/mapping.rs') 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, @@ -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, -- cgit