pub enum Ref {
Cell {
sheet: Option<String>,
addr: CellAddr,
},
Range {
sheet: Option<String>,
start: CellAddr,
end: CellAddr,
},
Name(String),
}Expand description
A parsed reference. Resolution (what the reference evaluates to) is delegated to the embedding application; see the workbook v1 scope ADR.
Variants§
Cell
A single cell, optionally sheet-qualified: A1, Sheet1!A1, 'Q2 Data'!A1.
Fields
Range
A rectangular range, optionally sheet-qualified: A1:D4, Sheet1!A1:B2.
Fields
Name(String)
A named reference (named range, defined name): TAX_RATE.
Implementations§
Source§impl Ref
impl Ref
Sourcepub fn classify(text: &str) -> Ref
pub fn classify(text: &str) -> Ref
Classify a bare identifier or range string into a Ref.
"A1" → Ref::Cell (no sheet), "A1:D4" → Ref::Range (no sheet),
anything else → Ref::Name. This is the mapping used for bare
identifiers in formulas, which stay crate::Expr::Variable nodes in
the AST for compatibility.
Trait Implementations§
impl StructuralPartialEq for Ref
Auto Trait Implementations§
impl Freeze for Ref
impl RefUnwindSafe for Ref
impl Send for Ref
impl Sync for Ref
impl Unpin for Ref
impl UnsafeUnpin for Ref
impl UnwindSafe for Ref
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