pub enum Value {
Empty,
Number(f64),
Text(Arc<str>),
Bool(bool),
Error(CellError),
Array(Arc<Array>),
}Expand description
A cell value or an intermediate formula result.
Variants§
Implementations§
Source§impl Value
impl Value
Sourcepub fn number(v: f64) -> Value
pub fn number(v: f64) -> Value
A number, or #NUM! when it is NaN or infinite (Excel never stores those).
pub fn text(s: impl Into<Arc<str>>) -> Value
pub fn is_empty(&self) -> bool
pub fn is_error(&self) -> bool
pub fn is_number(&self) -> bool
pub fn is_text(&self) -> bool
pub fn as_error(&self) -> Option<CellError>
pub fn as_f64(&self) -> Option<f64>
pub fn as_text(&self) -> Option<&str>
Sourcepub fn to_number(&self) -> Result<f64, CellError>
pub fn to_number(&self) -> Result<f64, CellError>
Coercion to a number as arithmetic does it: empty = 0, TRUE = 1, numeric text parses
(including dates, times, percentages and currency), other text = #VALUE!.
Sourcepub fn to_number_in(&self, sys: DateSystem) -> Result<f64, CellError>
pub fn to_number_in(&self, sys: DateSystem) -> Result<f64, CellError>
Value::to_number with date text read in the given workbook date system.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Value
impl<'de> Deserialize<'de> for Value
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 Value
Auto Trait Implementations§
impl Freeze for Value
impl RefUnwindSafe for Value
impl Send for Value
impl Sync for Value
impl Unpin for Value
impl UnsafeUnpin for Value
impl UnwindSafe for Value
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