pub enum GraphError {
EmptyFormula,
UnterminatedString {
position: usize,
},
UnterminatedQuote {
position: usize,
},
InvalidReference {
position: usize,
text: String,
},
ColumnOverflow {
position: usize,
text: String,
},
RowOverflow {
position: usize,
text: String,
},
RangeTooLarge {
start: (u32, u32),
end: (u32, u32),
cells: u64,
},
}Expand description
Everything that can go wrong while extracting references from a formula.
Variants§
EmptyFormula
The formula text was empty or held nothing but the leading =.
UnterminatedString
A string literal ("…") was opened but never closed. Bytes inside a
string literal are not scanned for references, so an unterminated
literal poisons the rest of the formula.
UnterminatedQuote
A quoted sheet name ('My Sheet'!A1) was opened but never closed.
InvalidReference
An explicit sheet qualifier (Sheet1!, 'My Sheet'!) was not
followed by a parseable cell reference. Unlike unqualified junk —
which the lenient scanner skips — a qualifier is explicit user
intent, so its failure is reported.
Fields
ColumnOverflow
A column name would exceed the crate’s coordinate space (u32
column index, 0-based). Practical grids are far smaller; this guards
pathological input like AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA1.
RowOverflow
A row number would exceed the crate’s coordinate space (u32 row
index, 0-based; row numbers are 1-based in A1 notation).
RangeTooLarge
A range reference would expand to more than
crate::refs::RANGE_CELL_CAP individual cells (e.g. a
whole-column A:A reference). The per-cell dependency model
requires materializing every cell in a range; refusing beats
silently allocating millions of edges. Pass an explicit bounded
range instead.
Trait Implementations§
Source§impl Clone for GraphError
impl Clone for GraphError
Source§impl Debug for GraphError
impl Debug for GraphError
Source§impl Display for GraphError
impl Display for GraphError
impl Eq for GraphError
Source§impl Error for GraphError
impl Error for GraphError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()