#[non_exhaustive]pub enum Value {
Empty,
Text(String),
Number(f64),
Bool(bool),
Date(Date),
}Expand description
A cell value.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Empty
No value; shown as an empty cell.
Text(String)
A string.
Number(f64)
A number.
Bool(bool)
A yes/no value.
Date(Date)
A calendar date.
Implementations§
Source§impl Value
impl Value
Sourcepub fn as_f64(&self) -> Option<f64>
pub fn as_f64(&self) -> Option<f64>
The numeric value: numbers as is, booleans as 0.0 or 1.0, otherwise None.
Sourcepub fn as_date(&self) -> Option<Date>
pub fn as_date(&self) -> Option<Date>
The date, for a Value::Date.
Sourcepub fn key_text(&self) -> String
pub fn key_text(&self) -> String
The text that identifies a row by this value, in
DataGrid::key_column.
Sourcepub fn is_empty(&self) -> bool
pub fn is_empty(&self) -> bool
The value is Value::Empty.
Trait Implementations§
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§
impl<T> AutoreleaseSafe for Twhere
T: ?Sized,
impl<T> AutoreleaseSafe for Twhere
T: ?Sized,
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