MCPcopy Create free account

hub / github.com/SamuelSchlesinger/tshts / functions

Functions1,456 in github.com/SamuelSchlesinger/tshts

↓ 9 callersFunctionwith_recalc_clock
Run `f` with `serial` published as the clock-snapshot context for the closure's duration. The previous value (likely `None`) is restored on exit, incl
src/domain/parser/mod.rs:764
↓ 8 callersFunctionfill_row
(app: &mut App, row: usize, n: usize)
src/presentation/input/normal/tests.rs:39
↓ 8 callersMethodfind_replace_search
(&mut self)
src/application/state/search.rs:115
↓ 8 callersFunctioninner
()
src/infrastructure/fetcher.rs:71
↓ 8 callersFunctionnow_serial
Excel serial value for the current instant. Reads the `RECALC_CLOCK` thread-local if a recalc is in scope, otherwise falls back to the live system clo
src/domain/parser/mod.rs:800
↓ 8 callersMethodpaste
(&mut self)
src/application/state/clipboard.rs:166
↓ 8 callersFunctionsave_xlsx
Write a Workbook as `.xlsx`. Each sheet gets its own XML; formulas, named ranges, and cell formatting (bold/underline/fg+bg colors, number formats) ar
src/infrastructure/xlsx.rs:456
↓ 8 callersMethodsend_tab
(&mut self)
tests/common/mod.rs:178
↓ 8 callersMethodset_column_width
(&mut self, col: usize, width: usize)
src/domain/models/spreadsheet/mod.rs:568
↓ 8 callersMethodset_many_with_undo
Write many cells as a single undo-able action. Use for bulk writes like pivot table generation where per-cell undo entries would force the user to pre
src/application/state/mod.rs:571
↓ 8 callersMethodset_name
Define or replace a named range. Keys are normalized to uppercase so formulas can reference them case-insensitively.
src/domain/models/workbook.rs:1146
↓ 8 callersMethodstart_selection
(&mut self)
src/application/state/mod.rs:624
↓ 8 callersMethodvim_reset_pending
(&mut self)
src/application/state/vim.rs:6
↓ 7 callersFunctionctrl
(app: &mut App, c: char)
src/presentation/input/visual/tests.rs:20
↓ 7 callersMethoddata_row
Returns the rendered N-th data row (1-indexed, like a spreadsheet). `data_row(1)` returns A1's row, etc.
tests/common/mod.rs:251
↓ 7 callersMethodextract_cell_references
Returns the cells (row, col) referenced by `formula`. Used for the dependency graph that drives automatic recalc.
src/domain/services/evaluator/refs.rs:12
↓ 7 callersFunctionfill_col
(app: &mut App, col: usize, n: usize)
src/presentation/input/normal/tests.rs:31
↓ 7 callersFunctionkey
(app: &mut App, code: KeyCode)
src/presentation/input/normal/tests.rs:17
↓ 7 callersMethodparse_equality
Parses equality expressions.
src/domain/parser/parser_impl.rs:75
↓ 7 callersMethodperform_search
(&mut self)
src/application/state/search.rs:25
↓ 7 callersMethodstart_find_replace
(&mut self)
src/application/state/search.rs:104
↓ 7 callersFunctionwrite
(cells: Vec<(usize, usize, CellData)>, source_row: usize, source_col: usize)
src/infrastructure/sidecar.rs:54
↓ 6 callersFunctionatomic_write
Write `contents` to `path` atomically. The temp filename includes the process id and a monotonic counter so concurrent writers (e.g. multiple tshts in
src/infrastructure/atomic.rs:31
↓ 6 callersFunctionbroadcast_binary
Broadcast a binary scalar op across array operands. Scalar × scalar is a scalar result. Array × scalar broadcasts the scalar across the array. Array ×
src/domain/parser/mod.rs:246
↓ 6 callersMethodcopy_selection
(&mut self)
src/application/state/clipboard.rs:34
↓ 6 callersFunctiondate_to_serial
Date serial helpers — Excel-style epoch 1899-12-30 = 0, modulo the famous 1900-leap-year bug which we elide here (we treat days correctly).
src/domain/parser/mod.rs:607
↓ 6 callersMethoddrain_dirty
Take the current dirty set, leaving the workbook's `dirty` empty. The recalc executor (PR 1+) calls this at the start of a recalc pass; mutation sites
src/domain/models/workbook.rs:1209
↓ 6 callersFunctioninstall_file_writer_for_test
Install the production atomic file writer into the domain's global `FileWriter` slot. `main()` does this for the binary; lib tests have to do it thems
src/domain/services/csv.rs:210
↓ 6 callersMethodmaybe_spill
After a cell write, if its formula evaluated to a multi-cell Array, expand the array into ghost cells. If any target overlaps a non-empty cell, set th
src/domain/models/spreadsheet/mod.rs:242
↓ 6 callersFunctionplan_from_workbook
(wb: &mut Workbook)
src/domain/services/executor.rs:592
↓ 6 callersMethodrename_sheet
Renames the active sheet. Rename the active sheet. Returns false (no-op) if `new_name` is empty or duplicates another sheet's name (case-insensitive).
src/domain/models/workbook.rs:1042
↓ 6 callersMethodresweep_all_spills
Drop every spill ghost on the sheet, then re-evaluate `maybe_spill` for each cell that has a formula. Called after row/col insert/delete because struc
src/domain/models/spreadsheet/mod.rs:192
↓ 6 callersMethodset_cell_comment
(&mut self, comment: Option<String>)
src/application/state/formatting.rs:248
↓ 6 callersMethodset_save_result
(&mut self, result: Result<String, String>)
src/application/state/io.rs:103
↓ 6 callersMethodsheet_idx_of
Look up the sheet index for a given [`SheetId`]. Returns `None` if the ID is unknown (e.g. the sheet was removed).
src/domain/models/workbook.rs:298
↓ 6 callersMethodstart_goto_cell
(&mut self)
src/application/state/search.rs:271
↓ 6 callersMethodstart_load_file
(&mut self)
src/application/state/io.rs:36
↓ 6 callersMethodtoggle_bold
(&mut self)
src/application/state/formatting.rs:178
↓ 6 callersFunctiontypestr
(app: &mut App, s: &str)
src/presentation/input/dialogs.rs:395
↓ 6 callersMethodvim_enter_visual
(&mut self, kind: VisualKind)
src/application/state/vim.rs:12
↓ 6 callersFunctionwith_active_sheet
Run `f` with `sheet_idx` as the active sheet, restoring the prior active sheet afterward. Lets undo/redo operations that take an explicit sheet_idx re
src/application/state/undo.rs:342
↓ 6 callersMethodwrite_cells_on_active
Bulk write — single graph rebuild + single recalc at the end, rather than per-cell propagation. The right path for paste, autofill, sort, find/replace
src/domain/models/workbook.rs:1271
↓ 5 callersMethodadjust_formula_structural
Generic structural formula adjustment using a mapping function on (row, col). Returning `None` from `map_ref` marks the reference as `#REF!`. Any form
src/domain/services/evaluator/adjust.rs:293
↓ 5 callersMethodcancel_filename_input
(&mut self)
src/application/state/io.rs:97
↓ 5 callersFunctionfind_help_match
(needle: &str, from: usize)
src/presentation/ui/help.rs:73
↓ 5 callersMethodfinish_editing_in_direction
(&mut self, dir: EditExitDir)
src/application/state/editing.rs:96
↓ 5 callersMethodfinish_goto_cell
(&mut self)
src/application/state/search.rs:278
↓ 5 callersFunctionget_help_text
()
src/presentation/ui/help.rs:104
↓ 5 callersMethodis_match
(&self, hay: &str)
src/application/state/matcher.rs:47
↓ 5 callersFunctionload_xlsx
Read an `.xlsx` file into a Workbook.
src/infrastructure/xlsx.rs:39
↓ 5 callersFunctionmode_label
(mode: &AppMode)
src/presentation/ui/status_bar.rs:178
↓ 5 callersMethodregister_cross_sheet_deps
Refresh the unified graph + purity classification for the cell at `(sheet_name, row, col)`. Called after every cell write. If the cell no longer has a
src/domain/models/workbook.rs:1326
↓ 5 callersMethodregister_function_with_purity
Registers a new function and explicitly tags its purity. Used by volatile / side-effecting builtins (RAND, NOW, GET, etc.).
src/domain/parser/registry.rs:58
↓ 5 callersMethodrequest_quit
(&mut self)
src/application/state/lifecycle.rs:6
↓ 5 callersMethodsave_in_place_or_prompt
(&mut self)
src/application/state/io.rs:6
↓ 5 callersMethodselection_cells
Collect every (row, col) in the active selection (or just the cursor cell if no selection is active). Used by every format-mutation path so they all g
src/application/state/formatting.rs:130
↓ 5 callersMethodset_csv_import_result
(&mut self, result: Result<Spreadsheet, String>)
src/application/state/io.rs:245
↓ 5 callersMethodset_load_workbook_result
(&mut self, result: Result<(Workbook, String), String>)
src/application/state/io.rs:121
↓ 5 callersMethodset_selection_fg_color
(&mut self, color: Option<TerminalColor>)
src/application/state/formatting.rs:214
↓ 5 callersMethodstart_csv_import
(&mut self)
src/application/state/io.rs:230
↓ 5 callersMethodswitch_next_sheet
(&mut self)
src/application/state/navigation.rs:6
↓ 5 callersMethodtoggle_underline
(&mut self)
src/application/state/formatting.rs:196
↓ 5 callersMethodtransitive_dependents
Transitive closure of dependents from `seeds`. Order is unspecified (HashSet iteration); callers that need a topological order should use `topo_levels
src/domain/models/dep_graph.rs:153
↓ 5 callersMethodunlink_node
Remove every outgoing edge from `node` (and the matching inverse entries in `dependents`). Use before re-linking when a cell's formula changes, or whe
src/domain/models/dep_graph.rs:115
↓ 5 callersFunctionwith_recalc_context
Run `f` with `wb` published in the thread-local recalc context. Nested scopes are supported — the previous pointer is restored on exit. Inside the cl
src/domain/models/workbook.rs:100
↓ 5 callersMethodwould_create_circular_reference
Walks the AST checking whether `formula` directly or transitively references `current_cell`. ``` use tshts::domain::{Spreadsheet, FormulaEvaluator};
src/domain/services/evaluator/mod.rs:127
↓ 4 callersFunctionadd_commas
Add thousands-separator commas to an integer-string.
src/domain/parser/mod.rs:663
↓ 4 callersMethodadjust_formula_for_sheet_structural
Generic structural-mutation adjustment scoped to one sheet's qualified refs. Mirrors `adjust_formula_structural` but operates on sheet-qualified refs
src/domain/services/evaluator/cross_sheet.rs:70
↓ 4 callersMethodadjust_other_sheets_for_structural
Walk every sheet OTHER than `mutated_idx` and apply `adjust` to each formula. `adjust` receives a fresh evaluator (bound to the sheet it's rewriting),
src/domain/models/workbook.rs:871
↓ 4 callersMethodapply_filter
(&mut self, col: usize, criteria: Option<String>)
src/application/state/formatting.rs:277
↓ 4 callersMethodcell_purity
Look up a cell's cached purity. Returns `Pure` for non-formula cells and for any cell not present in `cell_purities` (the implicit-Pure default keeps
src/domain/models/workbook.rs:418
↓ 4 callersMethodclear_cell_on_active
Clear a single cell on the active sheet, then propagate to dependents via the unified graph.
src/domain/models/workbook.rs:1255
↓ 4 callersFunctioncmp_ord
(left: &Value, right: &Value)
src/domain/parser/evaluator/mod.rs:101
↓ 4 callersMethodconditional_style_for
`_` in the predicate is replaced with the cell's value (quoted if non-numeric) before evaluation.
src/domain/models/spreadsheet/mod.rs:911
↓ 4 callersMethodconfirm_pending_action
(&mut self)
src/application/state/lifecycle.rs:30
↓ 4 callersMethodcut_selection
(&mut self)
src/application/state/clipboard.rs:90
↓ 4 callersMethoddelete_row_on_active
Structural row delete on the active sheet, with cross-sheet ref adjustment. Refs to the deleted row on other sheets become `#REF!`.
src/domain/models/workbook.rs:821
↓ 4 callersMethoddescription
Human-readable label for use in undo/redo status messages. `WorkbookSnapshot` carries its own per-command description (passed to `with_snapshot_undo`)
src/application/state/undo.rs:82
↓ 4 callersFunctioneval_one
Evaluate a single cell's formula against a workbook snapshot. Returns `None` for non-formula cells (no value to compute) or for cells whose owning she
src/domain/services/executor.rs:462
↓ 4 callersMethodextract_qualified_refs
Like `extract_cell_references` but preserves the sheet name of each reference. Returns `(sheet_name, row, col)` triples; `sheet_name` is `None` for un
src/domain/services/evaluator/refs.rs:31
↓ 4 callersFunctionformula_purity
Walk an AST and return the maximal [`FunctionPurity`] of any function it transitively calls. A formula is parallel-safe iff its purity is `Pure`, `Vol
src/domain/parser/evaluator/mod.rs:22
↓ 4 callersMethodget_selection_stats
(&mut self)
src/application/state/mod.rs:703
↓ 4 callersFunctionglob_match
Glob match supporting `*` (any) and `?` (one). Case-sensitive.
src/domain/parser/mod.rs:587
↓ 4 callersMethodinvalidate_cross_sheet_state
Drop per-sheet state that would be misleading on the new sheet: search results are stored as (row, col) only, so following them with n/N after a sheet
src/application/state/navigation.rs:35
↓ 4 callersFunctionkey
(app: &mut App, code: KeyCode)
src/presentation/input/dialogs.rs:400
↓ 4 callersFunctionput
(app: &mut App, row: usize, col: usize, s: &str)
src/presentation/input/normal/tests.rs:29
↓ 4 callersFunctionread
Returns the sidecar payload if it exists and looks well-formed.
src/infrastructure/sidecar.rs:87
↓ 4 callersMethodredo
(&mut self)
src/application/state/mod.rs:460
↓ 4 callersMethodremove_sheet
Removes a sheet by index. Adjusts active_sheet if needed. Won't remove the last sheet.
src/domain/models/workbook.rs:947
↓ 4 callersMethodreplace_all
(&mut self)
src/application/state/search.rs:204
↓ 4 callersMethodresolve_sheet
Map an optional sheet name (case-insensitive) to a `&Spreadsheet`. Returns the current sheet for `None`. Returns `Err` with a typed message when the n
src/domain/parser/evaluator/mod.rs:750
↓ 4 callersFunctionrestore_workbook
Replace `workbook` with `pre`'s contents (deep clone). Used by RowDeleted/ColDeleted undo where structural snapshots are the most reliable way to roll
src/application/state/undo.rs:246
↓ 4 callersMethodrow
Get the text of a specific row (0-indexed from the top).
tests/common/mod.rs:219
↓ 4 callersFunctionseed_loading
Park `url` in the Loading state so the next `fetch(url)` returns `FetchResult::Loading` without enqueueing. Models the racy in-flight window where two
src/infrastructure/fetcher.rs:466
↓ 4 callersFunctionseed_value
Seed `url` so the next `fetch(url)` returns `FetchResult::Value(body)`.
src/infrastructure/fetcher.rs:434
↓ 4 callersMethodsend_backspace
(&mut self)
tests/common/mod.rs:182
↓ 4 callersMethodsort_column_asc
(&mut self)
src/application/state/formatting.rs:6
↓ 4 callersMethodswitch_prev_sheet
(&mut self)
src/application/state/navigation.rs:19
↓ 4 callersFunctiontake_dynamic_targets
Drain and return the dynamic targets captured since the last call. Executors call this once before a `VolatileStructural` cell's eval to clear any lea
src/domain/parser/mod.rs:751
↓ 4 callersMethodvim_apply_line_op
(&mut self, op: VimOperator, count: usize)
src/application/state/vim.rs:100
← previousnext →101–200 of 1,456, ranked by callers