pub struct EngineAction<'a, R>where
R: EvaluationContext,{ /* private fields */ }Expand description
Minimal edit surface used by Engine::action.
This wrapper is intentionally thin for ticket 614 (commit-only): it delegates to existing
Engine edit methods and does not create changelog boundaries or implement rollback.
Implementations§
Source§impl<'a, R> EngineAction<'a, R>where
R: EvaluationContext,
impl<'a, R> EngineAction<'a, R>where
R: EvaluationContext,
pub fn name(&self) -> &str
pub fn set_cell_value( &mut self, sheet: &str, row: u32, col: u32, value: LiteralValue, ) -> Result<(), EditorError>
pub fn set_cell_formula( &mut self, sheet: &str, row: u32, col: u32, ast: ASTNode, ) -> Result<(), EditorError>
pub fn insert_rows( &mut self, sheet: &str, before: u32, count: u32, ) -> Result<ShiftSummary, EditorError>
pub fn delete_rows( &mut self, sheet: &str, start: u32, count: u32, ) -> Result<ShiftSummary, EditorError>
pub fn insert_columns( &mut self, sheet: &str, before: u32, count: u32, ) -> Result<ShiftSummary, EditorError>
pub fn delete_columns( &mut self, sheet: &str, start: u32, count: u32, ) -> Result<ShiftSummary, EditorError>
Sourcepub fn action<T>(
&mut self,
name: impl AsRef<str>,
f: impl FnOnce(&mut EngineAction<'_, R>) -> Result<T, EditorError>,
) -> Result<T, EditorError>
pub fn action<T>( &mut self, name: impl AsRef<str>, f: impl FnOnce(&mut EngineAction<'_, R>) -> Result<T, EditorError>, ) -> Result<T, EditorError>
Start an action from within an action.
Nested actions are currently disallowed (ticket 614), so this will return a
EditorError::TransactionFailed while an outer action is active.
Auto Trait Implementations§
impl<'a, R> Freeze for EngineAction<'a, R>
impl<'a, R> !RefUnwindSafe for EngineAction<'a, R>
impl<'a, R> !Send for EngineAction<'a, R>
impl<'a, R> !Sync for EngineAction<'a, R>
impl<'a, R> Unpin for EngineAction<'a, R>
impl<'a, R> UnsafeUnpin for EngineAction<'a, R>
impl<'a, R> !UnwindSafe for EngineAction<'a, R>
Blanket Implementations§
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> 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