summaryrefslogtreecommitdiff
path: root/systems/sheet/src/mapping.rs
diff options
context:
space:
mode:
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 {