pub struct ActionEffect {Show 14 fields
pub version: u32,
pub async_tasks: Vec<Task>,
pub status: StatusCode,
pub value_changed: Vec<SheetCellId>,
pub cell_removed: Vec<SheetCellId>,
pub style_changed: Vec<SheetCellId>,
pub row_inserted: Vec<SheetRowId>,
pub row_removed: Vec<SheetRowId>,
pub row_updated: Vec<SheetRowId>,
pub col_inserted: Vec<SheetColId>,
pub col_removed: Vec<SheetColId>,
pub col_updated: Vec<SheetColId>,
pub header_updated: Vec<u32>,
pub error_message: Option<String>,
}Expand description
ActionEffect represents the result of handling an EditAction.
Additionally, since LogiSheets allows developers to define their own functions,
the engine may encounter functions it cannot compute directly. In such cases,
the engine will return these tasks to the JavaScript side for further processing.
Fields§
§version: u32The undo-history version after the action: it advances only when an
undoable transaction is recorded. Undo, redo and rejections report 0.
For change detection use Workbook::get_version (the revision).
async_tasks: Vec<Task>Tasks should be calculated outside this engine(mainly because of network limitations and customer defined)
status: StatusCodeErr when the engine rejected the action. A rejection is reported
here, not raised: callers that need the write to land must check it.
value_changed: Vec<SheetCellId>Cells whose value changed, including recalculated dependents. Undo and redo swap whole snapshots and leave all the change lists empty, so a host must re-read everything after them.
cell_removed: Vec<SheetCellId>§style_changed: Vec<SheetCellId>§row_inserted: Vec<SheetRowId>§row_removed: Vec<SheetRowId>§row_updated: Vec<SheetRowId>Never populated at present.
col_inserted: Vec<SheetColId>§col_removed: Vec<SheetColId>§col_updated: Vec<SheetColId>Never populated at present.
header_updated: Vec<u32>Sheet indices whose row-heights or column-widths changed. Lets the frontend re-render row/column headers (and any UI chrome whose position depends on row/column metrics) for those sheets without invalidating cell content.
error_message: Option<String>Why the action failed, when status is Err. The status code is a
placeholder — every rejection is code 1 — so this is the only part a
caller can act on. A rejected transaction names and quotes the payload
it stopped at.
Implementations§
Source§impl ActionEffect
impl ActionEffect
pub fn rejected(reason: String) -> ActionEffect
pub fn from( version: u32, tasks: Vec<Task>, ty: WorkbookUpdateType, ) -> ActionEffect
Trait Implementations§
Source§impl Clone for ActionEffect
impl Clone for ActionEffect
Source§fn clone(&self) -> ActionEffect
fn clone(&self) -> ActionEffect
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ActionEffect
impl Debug for ActionEffect
Source§impl Default for ActionEffect
impl Default for ActionEffect
Source§fn default() -> ActionEffect
fn default() -> ActionEffect
Source§impl<'de> Deserialize<'de> for ActionEffect
impl<'de> Deserialize<'de> for ActionEffect
Source§fn deserialize<D>(
deserializer: D,
) -> Result<ActionEffect, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
fn deserialize<D>(
deserializer: D,
) -> Result<ActionEffect, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
Source§impl From<_GentsDummyActionEffect> for ActionEffect
impl From<_GentsDummyActionEffect> for ActionEffect
Source§fn from(value: _GentsDummyActionEffect) -> ActionEffect
fn from(value: _GentsDummyActionEffect) -> ActionEffect
Source§impl Serialize for ActionEffect
impl Serialize for ActionEffect
Source§fn serialize<S>(
&self,
serializer: S,
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
fn serialize<S>(
&self,
serializer: S,
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
Auto Trait Implementations§
impl Freeze for ActionEffect
impl RefUnwindSafe for ActionEffect
impl Send for ActionEffect
impl Sync for ActionEffect
impl Unpin for ActionEffect
impl UnsafeUnpin for ActionEffect
impl UnwindSafe for ActionEffect
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
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> ⓘ
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> ⓘ
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 moreimpl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.