diff options
| author | 魏曹先生 <1992414357@qq.com> | 2026-02-25 10:02:11 +0800 |
|---|---|---|
| committer | 魏曹先生 <1992414357@qq.com> | 2026-02-25 10:02:11 +0800 |
| commit | c171285118026e2339570d55914f749a5d0e47af (patch) | |
| tree | 8aa5f42b2c01019ffbfa9b791c65f61356d787ea /systems | |
| parent | b1509e9ecac1f28daefd7cb1078176d47d585252 (diff) | |
Add public getter for sheet mappings
Diffstat (limited to 'systems')
| -rw-r--r-- | systems/sheet/src/sheet.rs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/systems/sheet/src/sheet.rs b/systems/sheet/src/sheet.rs index e169e4e..07d284b 100644 --- a/systems/sheet/src/sheet.rs +++ b/systems/sheet/src/sheet.rs @@ -208,6 +208,11 @@ impl SheetData { Ok(SheetDataMmap { mmap }) } + /// Get the current SheetData's Mappings + pub fn mappings(&self) -> &HashSet<LocalMapping> { + &self.mappings + } + /// Check if a mapping exists in SheetData pub fn contains_mapping(&self, value: &Vec<String>) -> bool { self.mappings.contains(value) @@ -260,6 +265,11 @@ impl Sheet { self.data } + /// Get the current Sheet's Mappings + pub fn mappings(&self) -> &HashSet<LocalMapping> { + &self.data.mappings + } + /// Check if a mapping exists in this sheet (including unapplied edits) /// The difference from `contains_mapping_actual` is: /// This method will consider edit operations that have not yet been `apply()`-ed |
