pub struct Grid { /* private fields */ }Expand description
A sparse grid of string cells.
Sparse because an Office-like document is mostly empty: a million-cell sheet
with 900k empty cells must not allocate a million Strings.
Implementations§
Source§impl Grid
impl Grid
Source§impl Grid
impl Grid
pub fn js_new() -> Grid
pub fn js_set(&mut self, row: usize, col: usize, value: String)
pub fn js_get(&self, row: usize, col: usize) -> Option<String>
pub fn js_len(&self) -> usize
pub fn js_used_rows(&self) -> usize
pub fn js_used_cols(&self) -> usize
pub fn js_fill_down( &mut self, row: usize, col: usize, count: usize, max_rows: usize, ) -> Result<usize, JsValue>
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Grid
impl<'de> Deserialize<'de> for Grid
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl FromWasmAbi for Grid
impl FromWasmAbi for Grid
Source§impl IntoWasmAbi for Grid
impl IntoWasmAbi for Grid
Source§impl LongRefFromWasmAbi for Grid
impl LongRefFromWasmAbi for Grid
Source§impl OptionFromWasmAbi for Grid
impl OptionFromWasmAbi for Grid
Source§impl OptionIntoWasmAbi for Grid
impl OptionIntoWasmAbi for Grid
Source§impl RefFromWasmAbi for Grid
impl RefFromWasmAbi for Grid
Source§impl RefMutFromWasmAbi for Grid
impl RefMutFromWasmAbi for Grid
impl SupportsConstructor for Grid
impl SupportsInstanceProperty for Grid
impl SupportsStaticProperty for Grid
Source§impl TryFromJsValue for Grid
impl TryFromJsValue for Grid
Source§impl VectorFromWasmAbi for Grid
impl VectorFromWasmAbi for Grid
Source§impl VectorIntoWasmAbi for Grid
impl VectorIntoWasmAbi for Grid
Auto Trait Implementations§
impl Freeze for Grid
impl RefUnwindSafe for Grid
impl Send for Grid
impl Sync for Grid
impl Unpin for Grid
impl UnsafeUnpin for Grid
impl UnwindSafe for Grid
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> 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> 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.