visi-core 0.2.15

Embeddable spreadsheet engine: Excel formula compilation and evaluation, dependency-tracked recalculation, and .xlsx import/export
Documentation
use serde::{Deserialize, Serialize};

/// A single edit made to a workbook, recorded so a
/// host can observe or replay it.
#[derive(Debug, Clone, Serialize, Deserialize)]
pub enum SheetAction {
    /// A cell's raw text was replaced.
    SetCellSrc {
        /// Sheet the cell is on.
        sheet_name: String,
        /// Column index, 0-based.
        col: usize,
        /// Row index, 0-based.
        row: usize,
        /// The new text.
        src: String,
    },
    /// A column was renamed.
    UpdateColName {
        /// Sheet the column is on.
        sheet_name: String,
        /// Column index, 0-based.
        col: usize,
        /// The new name.
        name: String,
    },
    /// A sheet was renamed.
    UpdateTableName {
        /// The sheet's previous name.
        old_name: String,
        /// Its new name.
        new_name: String,
    },
    /// An empty row was inserted.
    InsertRow {
        /// Sheet the row was inserted on.
        sheet_name: String,
        /// Position it was inserted at, 0-based.
        index: usize,
    },
    /// A row was deleted.
    DeleteRow {
        /// Sheet the row was deleted from.
        sheet_name: String,
        /// Position it occupied, 0-based.
        index: usize,
    },
    /// An empty column was inserted.
    InsertCol {
        /// Sheet the column was inserted on.
        sheet_name: String,
        /// Position it was inserted at, 0-based.
        index: usize,
    },
    /// A column was deleted.
    DeleteCol {
        /// Sheet the column was deleted from.
        sheet_name: String,
        /// Position it occupied, 0-based.
        index: usize,
    },
    /// A sheet was added to the workbook.
    AddTable {
        /// The sheet, in full.
        sheet: Box<crate::core::Sheet>,
    },
    /// A sheet was removed from the workbook.
    DeleteTable {
        /// Name of the sheet that was removed.
        sheet_name: String,
    },
}