Skip to main content

Cell

Enum Cell 

Source
pub enum Cell {
    EmptyCell {
        s: i32,
    },
    BooleanCell {
        v: bool,
        s: i32,
    },
    NumberCell {
        v: f64,
        s: i32,
    },
    ErrorCell {
        ei: Error,
        s: i32,
    },
    SharedString {
        si: i32,
        s: i32,
    },
    CellFormula {
        f: i32,
        s: i32,
        v: FormulaValue,
    },
    ArrayFormula {
        f: i32,
        s: i32,
        r: (i32, i32),
        kind: ArrayKind,
        v: FormulaValue,
    },
    SpillCell {
        s: i32,
        a: (i32, i32),
        v: SpillValue,
    },
}

Variants§

§

EmptyCell

Fields

§

BooleanCell

Fields

§

NumberCell

Fields

§

ErrorCell

Fields

§

SharedString

Fields

§si: i32
§

CellFormula

§

ArrayFormula

§

SpillCell

Fields

§a: (i32, i32)

Implementations§

Source§

impl Cell

Source

pub fn new_string(si: i32, s: i32) -> Cell

Creates a new Cell with a shared string (si is the string index)

Source

pub fn new_number(v: f64, s: i32) -> Cell

Creates a new Cell with a number

Source

pub fn new_boolean(v: bool, s: i32) -> Cell

Creates a new Cell with a boolean

Source

pub fn new_error(ei: Error, s: i32) -> Cell

Creates a new Cell with an error value

Source

pub fn new_formula(f: i32, s: i32) -> Cell

Creates a new Cell with an unevaluated formula

Source

pub fn get_formula(&self) -> Option<i32>

Returns the formula index of a cell if any.

Source

pub fn has_formula(&self) -> bool

Source

pub fn set_style(&mut self, style: i32)

Source

pub fn get_style(&self) -> i32

Source

pub fn get_type(&self) -> CellType

Source

pub fn get_localized_text( &self, shared_strings: &[String], locale: &Locale, language: &Language, ) -> String

Source

pub fn value(&self, shared_strings: &[String], language: &Language) -> CellValue

Source

pub fn formatted_value<F>( &self, shared_strings: &[String], language: &Language, format_number: F, ) -> String
where F: Fn(f64) -> String,

Trait Implementations§

Source§

impl Clone for Cell

Source§

fn clone(&self) -> Cell

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Cell

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for Cell

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl PartialEq for Cell

Source§

fn eq(&self, other: &Cell) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<'__de> Decode<'__de> for Cell
where '__de:,

Source§

impl Encode for Cell

Source§

impl StructuralPartialEq for Cell

Auto Trait Implementations§

§

impl Freeze for Cell

§

impl RefUnwindSafe for Cell

§

impl Send for Cell

§

impl Sync for Cell

§

impl Unpin for Cell

§

impl UnsafeUnpin for Cell

§

impl UnwindSafe for Cell

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

§

impl<T> DecodeOwned for T
where T: for<'de> Decode<'de>,

§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,