Struct spreadsheet_ods::refs::CellRange[][src]

pub struct CellRange { /* fields omitted */ }

A cell-range.

As usual for a spreadsheet this is meant as inclusive from and to.

use spreadsheet_ods::CellRange;
let r1 = CellRange::local(0, 0, 9, 9);
let r2 = CellRange::origin_span(5, 5, (3, 3));

Implementations

impl CellRange[src]

pub fn new() -> Self[src]

pub fn local(row: ucell, col: ucell, to_row: ucell, to_col: ucell) -> Self[src]

Creates the cell range from from + to data.

pub fn remote<S: Into<String>>(
    table: S,
    row: ucell,
    col: ucell,
    to_row: ucell,
    to_col: ucell
) -> Self
[src]

Creates the cell range from from + to data.

pub fn origin_span(row: ucell, col: ucell, span: (ucell, ucell)) -> Self[src]

Creates the cell range from origin + spanning data.

pub fn set_table<S: Into<String>>(&mut self, table: S)[src]

Table name for references into other tables.

pub fn table(&self) -> Option<&String>[src]

Table name for references into other tables.

pub fn set_row(&mut self, row: ucell)[src]

pub fn row(&self) -> ucell[src]

pub fn set_row_abs(&mut self, abs: bool)[src]

“$” row reference

pub fn row_abs(&self) -> bool[src]

“$” row reference

pub fn set_col(&mut self, col: ucell)[src]

pub fn col(&self) -> ucell[src]

pub fn set_col_abs(&mut self, abs: bool)[src]

“$” column reference

pub fn col_abs(&self) -> bool[src]

“$” column reference

pub fn set_to_row(&mut self, to_row: ucell)[src]

pub fn to_row(&self) -> ucell[src]

pub fn set_to_row_abs(&mut self, abs: bool)[src]

“$” row reference

pub fn to_row_abs(&self) -> bool[src]

“$” row reference

pub fn set_to_col(&mut self, to_col: ucell)[src]

pub fn to_col(&self) -> ucell[src]

pub fn set_to_col_abs(&mut self, abs: bool)[src]

“$” column reference

pub fn to_col_abs(&self) -> bool[src]

“$” column reference

pub fn to_formula(&self) -> String[src]

Returns a range reference for a formula.

pub fn contains(&self, row: ucell, col: ucell) -> bool[src]

Does the range contain the cell. This is inclusive for to_row and to_col!

pub fn out_looped(&self, row: ucell, col: ucell) -> bool[src]

Is this range any longer relevant, when looping rows first, then columns?

Trait Implementations

impl Clone for CellRange[src]

impl Debug for CellRange[src]

impl Default for CellRange[src]

impl Display for CellRange[src]

impl Eq for CellRange[src]

impl PartialEq<CellRange> for CellRange[src]

impl StructuralEq for CellRange[src]

impl StructuralPartialEq for CellRange[src]

impl TryFrom<&'_ str> for CellRange[src]

type Error = OdsError

The type returned in the event of a conversion error.

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.