Struct spreadsheet_ods::refs::CellRef
source · pub struct CellRef { /* private fields */ }Expand description
A reference to a cell, possibly in another sheet in another file.
use spreadsheet_ods::CellRef;
let c1 = CellRef::local(5,2);
let c2 = CellRef::local(7,4).absolute_col();
let c3 = CellRef::remote("spreadsheet-2", 9,6);
let c4 = CellRef::try_from(".A6");Implementations§
source§impl CellRef
impl CellRef
sourcepub fn new_all(
iri: Option<String>,
table: Option<String>,
row_abs: bool,
row: u32,
col_abs: bool,
col: u32
) -> Self
pub fn new_all( iri: Option<String>, table: Option<String>, row_abs: bool, row: u32, col_abs: bool, col: u32 ) -> Self
New CellRef with all possible parameters.
sourcepub fn remote<S: Into<String>>(table: S, row: u32, col: u32) -> Self
pub fn remote<S: Into<String>>(table: S, row: u32, col: u32) -> Self
Creates a cellref that references another table.
sourcepub fn set_table<S: Into<String>>(&mut self, table: S)
pub fn set_table<S: Into<String>>(&mut self, table: S)
Table name for references into other tables.
sourcepub fn set_row_abs(&mut self, abs: bool)
pub fn set_row_abs(&mut self, abs: bool)
“$” row reference
sourcepub fn set_col_abs(&mut self, abs: bool)
pub fn set_col_abs(&mut self, abs: bool)
“$” column reference
sourcepub fn to_formula(&self) -> String
pub fn to_formula(&self) -> String
Returns a cell reference for a formula.
sourcepub fn absolute_row(self) -> Self
pub fn absolute_row(self) -> Self
Makes this CellReference into an absolute reference. The column remains relative, the row is fixed.
sourcepub fn absolute_col(self) -> Self
pub fn absolute_col(self) -> Self
Makes this CellReference into an absolute reference. The row remains relative, the column is fixed.
Trait Implementations§
source§impl PartialEq for CellRef
impl PartialEq for CellRef
impl Eq for CellRef
impl StructuralEq for CellRef
impl StructuralPartialEq for CellRef
Auto Trait Implementations§
impl RefUnwindSafe for CellRef
impl Send for CellRef
impl Sync for CellRef
impl Unpin for CellRef
impl UnwindSafe for CellRef
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