pub enum ReferenceType {
Cell {
sheet: Option<String>,
row: u32,
col: u32,
},
Range {
sheet: Option<String>,
start_row: Option<u32>,
start_col: Option<u32>,
end_row: Option<u32>,
end_col: Option<u32>,
},
Table(TableReference),
NamedRange(String),
}Expand description
A reference to something outside the cell.
Variants§
Implementations§
Source§impl ReferenceType
impl ReferenceType
Sourcepub fn from_string(reference: &str) -> Result<Self, ParsingError>
pub fn from_string(reference: &str) -> Result<Self, ParsingError>
Create a reference from a string. Can be A1, A:A, A1:B2, Table1[Column], etc.
Sourcepub fn from_string_with_dialect(
reference: &str,
dialect: FormulaDialect,
) -> Result<Self, ParsingError>
pub fn from_string_with_dialect( reference: &str, dialect: FormulaDialect, ) -> Result<Self, ParsingError>
Create a reference from a string using the specified formula dialect.
Sourcepub fn parse_sheet_ref(
reference: &str,
) -> Result<SheetRef<'static>, ParsingError>
pub fn parse_sheet_ref( reference: &str, ) -> Result<SheetRef<'static>, ParsingError>
Parse a grid reference into a shared SheetRef, preserving $ anchors.
Only cell and range references are supported. Table and named ranges return an error.
Sourcepub fn parse_sheet_ref_with_dialect(
reference: &str,
dialect: FormulaDialect,
) -> Result<SheetRef<'static>, ParsingError>
pub fn parse_sheet_ref_with_dialect( reference: &str, dialect: FormulaDialect, ) -> Result<SheetRef<'static>, ParsingError>
Parse a grid reference into a shared SheetRef using the specified dialect.
Sourcepub fn to_sheet_ref_lossy(&self) -> Option<SheetRef<'_>>
pub fn to_sheet_ref_lossy(&self) -> Option<SheetRef<'_>>
Lossy conversion from parsed ReferenceType into SheetRef. Absolute anchors are not recoverable from ReferenceType and default to relative.
Source§impl ReferenceType
impl ReferenceType
Trait Implementations§
Source§impl Clone for ReferenceType
impl Clone for ReferenceType
Source§fn clone(&self) -> ReferenceType
fn clone(&self) -> ReferenceType
Returns a duplicate of the value. Read more
1.0.0§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ReferenceType
impl Debug for ReferenceType
Source§impl Display for ReferenceType
impl Display for ReferenceType
Source§impl<'a> From<&'a ReferenceType> for RefView<'a>
impl<'a> From<&'a ReferenceType> for RefView<'a>
Source§fn from(r: &'a ReferenceType) -> Self
fn from(r: &'a ReferenceType) -> Self
Converts to this type from the input type.
Source§impl FromStr for ReferenceType
impl FromStr for ReferenceType
Source§impl Hash for ReferenceType
impl Hash for ReferenceType
Source§impl PartialEq for ReferenceType
impl PartialEq for ReferenceType
Source§impl TryFrom<&str> for ReferenceType
impl TryFrom<&str> for ReferenceType
impl StructuralPartialEq for ReferenceType
Auto Trait Implementations§
impl Freeze for ReferenceType
impl RefUnwindSafe for ReferenceType
impl Send for ReferenceType
impl Sync for ReferenceType
impl Unpin for ReferenceType
impl UnwindSafe for ReferenceType
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)