pub enum ChangeEvent {
Show 18 variants
SetValue {
addr: CellRef,
old_value: Option<LiteralValue>,
old_formula: Option<ASTNode>,
new: LiteralValue,
},
SetFormula {
addr: CellRef,
old_value: Option<LiteralValue>,
old_formula: Option<ASTNode>,
new: ASTNode,
},
SetRowVisibility {
sheet_id: SheetId,
row0: u32,
source: RowVisibilitySource,
old_hidden: bool,
new_hidden: bool,
},
AddVertex {
id: VertexId,
coord: Coord,
sheet_id: SheetId,
value: Option<LiteralValue>,
formula: Option<ASTNode>,
kind: Option<VertexKind>,
flags: Option<u8>,
},
RemoveVertex {
id: VertexId,
old_value: Option<LiteralValue>,
old_formula: Option<ASTNode>,
old_dependencies: Vec<VertexId>,
old_dependents: Vec<VertexId>,
coord: Option<Coord>,
sheet_id: Option<SheetId>,
kind: Option<VertexKind>,
flags: Option<u8>,
},
CompoundStart {
description: String,
depth: usize,
},
CompoundEnd {
depth: usize,
},
VertexMoved {
id: VertexId,
sheet_id: SheetId,
old_coord: Coord,
new_coord: Coord,
},
FormulaAdjusted {
id: VertexId,
addr: Option<CellRef>,
old_ast: ASTNode,
new_ast: ASTNode,
},
NamedRangeAdjusted {
name: String,
scope: NameScope,
old_definition: NamedDefinition,
new_definition: NamedDefinition,
},
EdgeAdded {
from: VertexId,
to: VertexId,
},
EdgeRemoved {
from: VertexId,
to: VertexId,
},
DefineName {
name: String,
scope: NameScope,
definition: NamedDefinition,
},
UpdateName {
name: String,
scope: NameScope,
old_definition: NamedDefinition,
new_definition: NamedDefinition,
},
DeleteName {
name: String,
scope: NameScope,
old_definition: Option<NamedDefinition>,
},
SpillCommitted {
anchor: VertexId,
old: Option<SpillSnapshot>,
new: SpillSnapshot,
},
SpillCleared {
anchor: VertexId,
old: SpillSnapshot,
},
StagedFormulaCellChanged {
sheet: String,
row: u32,
col: u32,
old: Option<String>,
new: Option<String>,
},
}Expand description
Represents a single change to the dependency graph
Variants§
SetValue
SetFormula
SetRowVisibility
AddVertex
Vertex creation snapshot (for undo). Minimal for now.
RemoveVertex
CompoundStart
CompoundEnd
VertexMoved
FormulaAdjusted
Fields
NamedRangeAdjusted
EdgeAdded
EdgeRemoved
DefineName
UpdateName
DeleteName
SpillCommitted
SpillCleared
StagedFormulaCellChanged
Workbook-level per-cell staged formula delta used to keep deferred edits undoable.
Replaces the former StagedFormulaStateChanged full before/after snapshot
pair (which made interactive set_formula O(N) per edit and O(N^2) in
changelog memory — see #126). Each edit records only the affected cell’s
staged text transition, so a sequence of N edits costs O(N) total.
old: the staged formula text for the cell before the edit, if any.new: the staged formula text for the cell after the edit, if any.
Undo restores old (re-stage if Some, clear if None); redo applies
new (re-stage if Some, clear if None).
Trait Implementations§
Source§impl Clone for ChangeEvent
impl Clone for ChangeEvent
Source§fn clone(&self) -> ChangeEvent
fn clone(&self) -> ChangeEvent
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ChangeEvent
impl Debug for ChangeEvent
Source§impl PartialEq for ChangeEvent
impl PartialEq for ChangeEvent
Source§fn eq(&self, other: &ChangeEvent) -> bool
fn eq(&self, other: &ChangeEvent) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for ChangeEvent
Auto Trait Implementations§
impl Freeze for ChangeEvent
impl RefUnwindSafe for ChangeEvent
impl Send for ChangeEvent
impl Sync for ChangeEvent
impl Unpin for ChangeEvent
impl UnsafeUnpin for ChangeEvent
impl UnwindSafe for ChangeEvent
Blanket Implementations§
impl<T> Allocation for T
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more