From c171285118026e2339570d55914f749a5d0e47af Mon Sep 17 00:00:00 2001 From: 魏曹先生 <1992414357@qq.com> Date: Wed, 25 Feb 2026 10:02:11 +0800 Subject: Add public getter for sheet mappings --- systems/sheet/src/sheet.rs | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'systems') 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 { + &self.mappings + } + /// Check if a mapping exists in SheetData pub fn contains_mapping(&self, value: &Vec) -> bool { self.mappings.contains(value) @@ -260,6 +265,11 @@ impl Sheet { self.data } + /// Get the current Sheet's Mappings + pub fn mappings(&self) -> &HashSet { + &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 -- cgit