#[non_exhaustive]pub struct CellSnapshot {
pub value: CellValue,
pub formula: Option<FormulaText>,
pub display: Option<CellDisplay>,
}Expand description
A full snapshot of one cell: typed value + optional formula + optional display metadata (RFC-020).
display is populated by default using CellDisplay::from_value; it can be
overridden by the calling application without touching the typed value.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.value: CellValue§formula: Option<FormulaText>§display: Option<CellDisplay>Implementations§
Source§impl CellSnapshot
impl CellSnapshot
Sourcepub fn new(
value: CellValue,
formula: Option<FormulaText>,
display: Option<CellDisplay>,
) -> Self
pub fn new( value: CellValue, formula: Option<FormulaText>, display: Option<CellDisplay>, ) -> Self
Construct a CellSnapshot from its components.
Sourcepub fn preferred_display(&self) -> String
pub fn preferred_display(&self) -> String
Return the best available display string: display.text when present,
otherwise value.display_default().
Trait Implementations§
Source§impl Clone for CellSnapshot
impl Clone for CellSnapshot
Source§fn clone(&self) -> CellSnapshot
fn clone(&self) -> CellSnapshot
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for CellSnapshot
impl Debug for CellSnapshot
Source§impl PartialEq for CellSnapshot
impl PartialEq for CellSnapshot
impl StructuralPartialEq for CellSnapshot
Auto Trait Implementations§
impl Freeze for CellSnapshot
impl RefUnwindSafe for CellSnapshot
impl Send for CellSnapshot
impl Sync for CellSnapshot
impl Unpin for CellSnapshot
impl UnsafeUnpin for CellSnapshot
impl UnwindSafe for CellSnapshot
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