pub struct WorkbookEditor { /* private fields */ }Expand description
Stateful JS/WASM workbook editor for calculation-oriented workflows. OOXML writing remains the responsibility of the package’s existing JS writer.
Implementations§
Source§impl WorkbookEditor
impl WorkbookEditor
pub fn new(bytes: &[u8]) -> Result<WorkbookEditor, JsValue>
pub fn set_number( &mut self, sheet: &str, row: u32, col: u32, value: f64, ) -> Result<(), JsValue>
pub fn set_string( &mut self, sheet: &str, row: u32, col: u32, value: &str, ) -> Result<(), JsValue>
pub fn set_boolean( &mut self, sheet: &str, row: u32, col: u32, value: bool, ) -> Result<(), JsValue>
pub fn recalculate(&mut self) -> Result<String, JsValue>
pub fn snapshot(&mut self) -> String
pub fn undo(&mut self) -> bool
pub fn redo(&mut self) -> bool
pub fn begin_transaction(&mut self) -> Result<(), JsValue>
pub fn commit_transaction(&mut self) -> bool
pub fn abort_transaction(&mut self) -> bool
pub fn can_undo(&self) -> bool
pub fn can_redo(&self) -> bool
Trait Implementations§
Source§impl From<WorkbookEditor> for JsValue
impl From<WorkbookEditor> for JsValue
Source§fn from(value: WorkbookEditor) -> Self
fn from(value: WorkbookEditor) -> Self
Converts to this type from the input type.
Source§impl FromWasmAbi for WorkbookEditor
impl FromWasmAbi for WorkbookEditor
Source§impl IntoWasmAbi for WorkbookEditor
impl IntoWasmAbi for WorkbookEditor
Source§impl LongRefFromWasmAbi for WorkbookEditor
impl LongRefFromWasmAbi for WorkbookEditor
Source§type Abi = WasmPtr<WasmRefCell<WorkbookEditor>>
type Abi = WasmPtr<WasmRefCell<WorkbookEditor>>
Same as
RefFromWasmAbi::AbiSource§type Anchor = RcRef<WorkbookEditor>
type Anchor = RcRef<WorkbookEditor>
Same as
RefFromWasmAbi::AnchorSource§unsafe fn long_ref_from_abi(js: Self::Abi) -> Self::Anchor
unsafe fn long_ref_from_abi(js: Self::Abi) -> Self::Anchor
Same as
RefFromWasmAbi::ref_from_abiSource§impl OptionFromWasmAbi for WorkbookEditor
impl OptionFromWasmAbi for WorkbookEditor
Source§impl OptionIntoWasmAbi for WorkbookEditor
impl OptionIntoWasmAbi for WorkbookEditor
Source§impl RefFromWasmAbi for WorkbookEditor
impl RefFromWasmAbi for WorkbookEditor
Source§type Abi = WasmPtr<WasmRefCell<WorkbookEditor>>
type Abi = WasmPtr<WasmRefCell<WorkbookEditor>>
The Wasm ABI type references to
Self are recovered from.Source§type Anchor = RcRef<WorkbookEditor>
type Anchor = RcRef<WorkbookEditor>
The type that holds the reference to
Self for the duration of the
invocation of the function that has an &Self parameter. This is
required to ensure that the lifetimes don’t persist beyond one function
call, and so that they remain anonymous.Source§impl RefMutFromWasmAbi for WorkbookEditor
impl RefMutFromWasmAbi for WorkbookEditor
Source§type Abi = WasmPtr<WasmRefCell<WorkbookEditor>>
type Abi = WasmPtr<WasmRefCell<WorkbookEditor>>
Same as
RefFromWasmAbi::AbiSource§type Anchor = RcRefMut<WorkbookEditor>
type Anchor = RcRefMut<WorkbookEditor>
Same as
RefFromWasmAbi::AnchorSource§unsafe fn ref_mut_from_abi(js: Self::Abi) -> Self::Anchor
unsafe fn ref_mut_from_abi(js: Self::Abi) -> Self::Anchor
Same as
RefFromWasmAbi::ref_from_abiimpl SupportsConstructor for WorkbookEditor
impl SupportsInstanceProperty for WorkbookEditor
impl SupportsStaticProperty for WorkbookEditor
Source§impl TryFromJsValue for WorkbookEditor
impl TryFromJsValue for WorkbookEditor
Source§impl VectorFromWasmAbi for WorkbookEditor
impl VectorFromWasmAbi for WorkbookEditor
type Abi = <Box<[JsValue]> as FromWasmAbi>::Abi
unsafe fn vector_from_abi(js: Self::Abi) -> Box<[WorkbookEditor]>
Source§impl VectorIntoWasmAbi for WorkbookEditor
impl VectorIntoWasmAbi for WorkbookEditor
type Abi = <Box<[JsValue]> as IntoWasmAbi>::Abi
fn vector_into_abi(vector: Box<[WorkbookEditor]>) -> Self::Abi
Source§impl WasmDescribeVector for WorkbookEditor
impl WasmDescribeVector for WorkbookEditor
Auto Trait Implementations§
impl Freeze for WorkbookEditor
impl RefUnwindSafe for WorkbookEditor
impl Send for WorkbookEditor
impl Sync for WorkbookEditor
impl Unpin for WorkbookEditor
impl UnsafeUnpin for WorkbookEditor
impl UnwindSafe for WorkbookEditor
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> ReturnWasmAbi for Twhere
T: IntoWasmAbi,
impl<T> ReturnWasmAbi for Twhere
T: IntoWasmAbi,
Source§type Abi = <T as IntoWasmAbi>::Abi
type Abi = <T as IntoWasmAbi>::Abi
Same as
IntoWasmAbi::AbiSource§fn return_abi(self) -> <T as ReturnWasmAbi>::Abi
fn return_abi(self) -> <T as ReturnWasmAbi>::Abi
Same as
IntoWasmAbi::into_abi, except that it may throw and never
return in the case of Err.