pub struct Cell {
pub value: Value,
pub formula: Option<Arc<Formula>>,
pub style: StyleId,
pub py: Option<Arc<PyCode>>,
}Fields§
§value: ValueConstant value, or the cached result of the formula or Python code.
formula: Option<Arc<Formula>>§style: StyleId§py: Option<Arc<PyCode>>Python code, for a Python cell (which has no formula).
Implementations§
Source§impl Cell
impl Cell
pub fn value(v: Value) -> Cell
pub fn formula(f: Formula) -> Cell
Sourcepub fn is_blank(&self) -> bool
pub fn is_blank(&self) -> bool
No value, no formula, no Python code and the default style: storing it is pointless.
Sourcepub fn has_content(&self) -> bool
pub fn has_content(&self) -> bool
Whether the cell holds content (a value, a formula or Python code), formats aside.
Sourcepub fn clear_content(&mut self)
pub fn clear_content(&mut self)
Removes the content (value, formula and Python code), keeping the style.
Sourcepub fn input_text(&self) -> String
pub fn input_text(&self) -> String
What the formula bar shows: a formula, a Python cell’s code, or the value.
Sourcepub fn bar_text(&self) -> String
pub fn bar_text(&self) -> String
What the formula bar shows when not editing: input_text, with a
legacy array formula in braces ({=A1:A2*2}).
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Cell
impl<'de> Deserialize<'de> for Cell
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
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> 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