Struct spreadsheet_ods::CellContent
source · pub struct CellContent {
pub value: Value,
pub style: Option<CellStyleRef>,
pub formula: Option<String>,
pub repeat: u32,
pub validation_name: Option<ValidationRef>,
pub span: CellSpan,
pub matrix_span: CellSpan,
pub annotation: Option<Box<Annotation>>,
pub draw_frames: Vec<DrawFrame>,
}Expand description
A copy of the relevant data for a spreadsheet cell.
Fields§
§value: ValueCell value.
style: Option<CellStyleRef>Cell stylename.
formula: Option<String>Cell formula.
repeat: u32Cell repeat count.
validation_name: Option<ValidationRef>Reference to a validation rule.
span: CellSpanCellspan.
matrix_span: CellSpanMatrix span.
annotation: Option<Box<Annotation>>Annotation
draw_frames: Vec<DrawFrame>DrawFrames
Implementations§
source§impl CellContent
impl CellContent
sourcepub fn set_formula<V: Into<String>>(&mut self, formula: V)
pub fn set_formula<V: Into<String>>(&mut self, formula: V)
Sets the formula.
sourcepub fn clear_formula(&mut self)
pub fn clear_formula(&mut self)
Resets the formula.
sourcepub fn style(&self) -> Option<&CellStyleRef>
pub fn style(&self) -> Option<&CellStyleRef>
Returns the cell style.
sourcepub fn set_style(&mut self, style: &CellStyleRef)
pub fn set_style(&mut self, style: &CellStyleRef)
Sets the cell style.
sourcepub fn clear_style(&mut self)
pub fn clear_style(&mut self)
Removes the style.
sourcepub fn set_repeat(&mut self, repeat: u32)
pub fn set_repeat(&mut self, repeat: u32)
Sets the repeat count for the cell. Value must be > 0.
sourcepub fn get_repeat(&mut self) -> u32
pub fn get_repeat(&mut self) -> u32
Returns the repeat count for the cell.
sourcepub fn validation(&self) -> Option<&ValidationRef>
pub fn validation(&self) -> Option<&ValidationRef>
Returns the validation name.
sourcepub fn set_validation(&mut self, validation: &ValidationRef)
pub fn set_validation(&mut self, validation: &ValidationRef)
Sets the validation name.
sourcepub fn clear_validation(&mut self)
pub fn clear_validation(&mut self)
No validation.
sourcepub fn set_row_span(&mut self, rows: u32)
pub fn set_row_span(&mut self, rows: u32)
Sets the row span of this cell. Cells below with values will be lost when writing.
sourcepub fn set_col_span(&mut self, cols: u32)
pub fn set_col_span(&mut self, cols: u32)
Sets the column span of this cell. Cells to the right with values will be lost when writing.
sourcepub fn set_matrix_row_span(&mut self, rows: u32)
pub fn set_matrix_row_span(&mut self, rows: u32)
Sets the row span of this cell. Cells below with values will be lost when writing.
sourcepub fn matrix_row_span(&self) -> u32
pub fn matrix_row_span(&self) -> u32
Returns the row span.
sourcepub fn set_matrix_col_span(&mut self, cols: u32)
pub fn set_matrix_col_span(&mut self, cols: u32)
Sets the column span of this cell. Cells to the right with values will be lost when writing.
sourcepub fn matrix_col_span(&self) -> u32
pub fn matrix_col_span(&self) -> u32
Returns the col span.
sourcepub fn set_annotation(&mut self, annotation: Annotation)
pub fn set_annotation(&mut self, annotation: Annotation)
Annotation
sourcepub fn clear_annotation(&mut self)
pub fn clear_annotation(&mut self)
Annotation
sourcepub fn annotation(&self) -> Option<&Annotation>
pub fn annotation(&self) -> Option<&Annotation>
Returns the Annotation
sourcepub fn set_draw_frames(&mut self, draw_frames: Vec<DrawFrame>)
pub fn set_draw_frames(&mut self, draw_frames: Vec<DrawFrame>)
Draw Frames
sourcepub fn draw_frames(&self) -> &Vec<DrawFrame>
pub fn draw_frames(&self) -> &Vec<DrawFrame>
Draw Frames
Trait Implementations§
source§impl Clone for CellContent
impl Clone for CellContent
source§fn clone(&self) -> CellContent
fn clone(&self) -> CellContent
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moresource§impl Debug for CellContent
impl Debug for CellContent
source§impl Default for CellContent
impl Default for CellContent
source§fn default() -> CellContent
fn default() -> CellContent
Auto Trait Implementations§
impl Freeze for CellContent
impl RefUnwindSafe for CellContent
impl Send for CellContent
impl Sync for CellContent
impl Unpin for CellContent
impl UnwindSafe for CellContent
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit)