Struct spreadsheet_ods::CellContentRef

source ·
pub struct CellContentRef<'a> {
    pub value: &'a Value,
    pub style: Option<&'a CellStyleRef>,
    pub formula: Option<&'a String>,
    pub repeat: u32,
    pub validation_name: Option<&'a ValidationRef>,
    pub span: CellSpan,
    pub matrix_span: CellSpan,
    pub annotation: Option<&'a Annotation>,
    pub draw_frames: Option<&'a Vec<DrawFrame>>,
}
Expand description

Holds references to the combined content of a cell. A temporary to hold the data when iterating over a sheet.

Fields§

§value: &'a Value

Reference to the cell value.

§style: Option<&'a CellStyleRef>

Reference to the stylename.

§formula: Option<&'a String>

Reference to the cell formula.

§repeat: u32

Reference to the repeat count.

§validation_name: Option<&'a ValidationRef>

Reference to a cell validation.

§span: CellSpan

Reference to the cellspan.

§matrix_span: CellSpan

Reference to a matrix cellspan.

§annotation: Option<&'a Annotation>

Reference to an annotation.

§draw_frames: Option<&'a Vec<DrawFrame>>

Reference to draw-frames.

Implementations§

source§

impl<'a> CellContentRef<'a>

source

pub fn value(&self) -> &'a Value

Returns the value.

source

pub fn formula(&self) -> Option<&'a String>

Returns the formula.

source

pub fn style(&self) -> Option<&'a CellStyleRef>

Returns the cell style.

source

pub fn repeat(&self) -> u32

Returns the repeat count.

source

pub fn validation(&self) -> Option<&'a ValidationRef>

Returns the validation name.

source

pub fn row_span(&self) -> u32

Returns the row span.

source

pub fn col_span(&self) -> u32

Returns the col span.

source

pub fn matrix_row_span(&self) -> u32

Returns the row span for a matrix.

source

pub fn matrix_col_span(&self) -> u32

Returns the col span for a matrix.

source

pub fn annotation(&self) -> Option<&'a Annotation>

Returns the validation name.

source

pub fn draw_frames(&self) -> Option<&'a Vec<DrawFrame>>

Returns draw frames.

source

pub fn to_owned(&self) -> CellContent

Creates a owned CellContent.

Trait Implementations§

source§

impl<'a> Clone for CellContentRef<'a>

source§

fn clone(&self) -> CellContentRef<'a>

Returns a copy of the value. Read more
1.0.0 · source§

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

Performs copy-assignment from source. Read more
source§

impl<'a> Debug for CellContentRef<'a>

source§

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

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

impl<'a> Copy for CellContentRef<'a>

Auto Trait Implementations§

§

impl<'a> Freeze for CellContentRef<'a>

§

impl<'a> RefUnwindSafe for CellContentRef<'a>

§

impl<'a> Send for CellContentRef<'a>

§

impl<'a> Sync for CellContentRef<'a>

§

impl<'a> Unpin for CellContentRef<'a>

§

impl<'a> UnwindSafe for CellContentRef<'a>

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§

default unsafe fn clone_to_uninit(&self, dst: *mut T)

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

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

source§

unsafe fn clone_to_uninit(&self, dst: *mut T)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. 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,

§

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>,

§

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>,

§

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.