summaryrefslogtreecommitdiff
path: root/systems/sheet/src/mapping.rs
diff options
context:
space:
mode:
author魏曹先生 <1992414357@qq.com>2026-02-27 06:16:23 +0800
committer魏曹先生 <1992414357@qq.com>2026-02-27 06:16:23 +0800
commit748c8a3353df887ee4b01e0e1327aa95c1c7225a (patch)
treeab84ee3fd6af53e8b03e73f9bdc5177f10606e4a /systems/sheet/src/mapping.rs
parent53141f612ab43136b4b1db7406ac71bb97284460 (diff)
Add remote flag to IndexSource and parsing support
Diffstat (limited to 'systems/sheet/src/mapping.rs')
-rw-r--r--systems/sheet/src/mapping.rs10
1 files changed, 10 insertions, 0 deletions
diff --git a/systems/sheet/src/mapping.rs b/systems/sheet/src/mapping.rs
index f509c0b..3dfb67e 100644
--- a/systems/sheet/src/mapping.rs
+++ b/systems/sheet/src/mapping.rs
@@ -6,6 +6,8 @@ use serde::{Deserialize, Serialize};
use crate::{index_source::IndexSource, mapping::error::ParseMappingError};
pub mod error;
+pub mod parse;
+pub mod parse_test;
// Validation rules for LocalMapping
// LocalMapping is a key component for writing and reading SheetData
@@ -438,6 +440,14 @@ impl std::fmt::Display for LocalMapping {
}
}
+impl TryFrom<String> for LocalMapping {
+ type Error = ParseMappingError;
+
+ fn try_from(s: String) -> Result<Self, Self::Error> {
+ s.as_str().try_into()
+ }
+}
+
// Implement editing functionality for MappingBuf and LocalMapping
impl MappingBuf {