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 GetSize for CellRef
impl GetSize for CellRef
Source§fn get_heap_size(&self) -> usize
fn get_heap_size(&self) -> usize
Determines how many bytes this object occupies inside the heap. Read more
Source§fn get_heap_size_with_tracker<TRACKER: GetSizeTracker>(
&self,
tracker: TRACKER,
) -> (usize, TRACKER)
fn get_heap_size_with_tracker<TRACKER: GetSizeTracker>( &self, tracker: TRACKER, ) -> (usize, TRACKER)
Determines how many bytes this object occupies inside the heap while using a
tracker
. Read moreSource§fn get_stack_size() -> usize
fn get_stack_size() -> usize
Determines how may bytes this object occupies inside the stack. Read more
Source§fn get_size_with_tracker<T>(&self, tracker: T) -> (usize, T)where
T: GetSizeTracker,
fn get_size_with_tracker<T>(&self, tracker: T) -> (usize, T)where
T: GetSizeTracker,
Determines the total size of the object while using a
tracker
. Read moreimpl Eq for CellRef
impl StructuralPartialEq for CellRef
Auto Trait Implementations§
impl Freeze for CellRef
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.