diff options
| author | 魏曹先生 <1992414357@qq.com> | 2026-01-23 04:09:06 +0800 |
|---|---|---|
| committer | 魏曹先生 <1992414357@qq.com> | 2026-01-23 04:09:06 +0800 |
| commit | 3003ef7c113ee062ff8e6553bc6cd7504c48c629 (patch) | |
| tree | ea4e7cc41883b26681d96ab722ebba4e09a32fd5 | |
| parent | 03b634b7698ecae9384fa303f2b6183c76c7c6f0 (diff) | |
Add `new` function to LocalSheet
| -rw-r--r-- | data/src/data/local/local_sheet.rs | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/data/src/data/local/local_sheet.rs b/data/src/data/local/local_sheet.rs index 6f9924c..a996cc8 100644 --- a/data/src/data/local/local_sheet.rs +++ b/data/src/data/local/local_sheet.rs @@ -28,6 +28,23 @@ pub struct LocalSheet<'a> { pub(crate) data: LocalSheetData, } +impl<'a> LocalSheet<'a> { + /// Create a new LocalSheet instance + pub fn new( + local_workspace: &'a LocalWorkspace, + member: MemberId, + sheet_name: String, + data: LocalSheetData, + ) -> Self { + Self { + local_workspace, + member, + sheet_name, + data, + } + } +} + #[derive(Debug, Default, Serialize, Deserialize, ConfigFile, Clone)] #[cfg_file(path = CLIENT_FILE_LOCAL_SHEET_NOSET)] // Do not use LocalSheet::write or LocalSheet::read pub struct LocalSheetData { |
