#[non_exhaustive]pub struct CellDisplay {
pub text: String,
pub format: Option<CellNumberFormat>,
pub source: DisplaySource,
}Expand description
Human-friendly display metadata attached to a cell value (RFC-020).
text is the primary display string. format and source are optional
metadata; consumers may use them for localisation or formatting hints.
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.text: StringThe display string — deterministic and locale-neutral by default.
format: Option<CellNumberFormat>Number-format metadata when available (always None in calamine 0.35).
source: DisplaySourceImplementations§
Source§impl CellDisplay
impl CellDisplay
Sourcepub fn new(
text: String,
format: Option<CellNumberFormat>,
source: DisplaySource,
) -> Self
pub fn new( text: String, format: Option<CellNumberFormat>, source: DisplaySource, ) -> Self
Construct a CellDisplay from its components.
Sourcepub fn from_value(value: &CellValue) -> Self
pub fn from_value(value: &CellValue) -> Self
Build a default display from a CellValue.
Trait Implementations§
Source§impl Clone for CellDisplay
impl Clone for CellDisplay
Source§fn clone(&self) -> CellDisplay
fn clone(&self) -> CellDisplay
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 CellDisplay
impl Debug for CellDisplay
impl Eq for CellDisplay
Source§impl PartialEq for CellDisplay
impl PartialEq for CellDisplay
Source§fn eq(&self, other: &CellDisplay) -> bool
fn eq(&self, other: &CellDisplay) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for CellDisplay
Auto Trait Implementations§
impl Freeze for CellDisplay
impl RefUnwindSafe for CellDisplay
impl Send for CellDisplay
impl Sync for CellDisplay
impl Unpin for CellDisplay
impl UnsafeUnpin for CellDisplay
impl UnwindSafe for CellDisplay
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.