Skip to main content

DiagnosticKind

Enum DiagnosticKind 

Source
#[non_exhaustive]
pub enum DiagnosticKind { FormulaUnavailable, FormulaCachedValueUnverified, AmbiguousSheetMatch { candidates: Vec<SheetRef>, }, UnsupportedCellValue { detail: String, }, UnsupportedWorkbookFeature { feature: String, }, UnsupportedWorkbookMetadata { category: String, }, DefinedNameScopeUnknown, DateTimeNotNormalized, LimitTruncatedCells { limit: String, observed: u64, }, AlignmentBoundExceeded { limit: u64, observed: u64, }, DuplicateAlignmentKey { old_count: usize, new_count: usize, }, }
Expand description

Structured diagnostic kind.

code() returns a stable string identifier for serde / localisation; it is never renamed within a major version.

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.
§

FormulaUnavailable

§

FormulaCachedValueUnverified

§

AmbiguousSheetMatch

Fields

§candidates: Vec<SheetRef>
§

UnsupportedCellValue

Fields

§detail: String
§

UnsupportedWorkbookFeature

Fields

§feature: String
§

UnsupportedWorkbookMetadata

Fields

§category: String
§

DefinedNameScopeUnknown

§

DateTimeNotNormalized

§

LimitTruncatedCells

Fields

§limit: String
§observed: u64
§

AlignmentBoundExceeded

RFC-035 §5.2: the alignment row-product bound (Limits::max_alignment_product) was exceeded, so this sheet fell back to positional comparison. Never paired with an error — alignment degrades, it does not fail.

Fields

§limit: u64
§observed: u64
§

DuplicateAlignmentKey

Two or more rows share the same alignment key. Replaces the previous (incorrect) reuse of UnsupportedCellValue for this condition — no cell value failed to normalise here.

Fields

§old_count: usize
§new_count: usize

Implementations§

Source§

impl DiagnosticKind

Source

pub fn code(&self) -> &'static str

Stable code string for this diagnostic kind.

These strings are the stable programmatic surface for diagnostics. Match on code() rather than on the #[non_exhaustive] enum variants: new variants may be added in a minor release (which would break an exhaustive match on the enum), but an existing code string is never renamed within a major version. Codes also appear verbatim in serialised JSON.

The complete set of codes in this major version:

CodeMeaning
formula_unavailableA cell’s formula text could not be read
formula_cached_value_unverifiedA formula’s cached value could not be verified
ambiguous_sheet_matchSheet rename detection found more than one candidate
unsupported_cell_valueA cell value could not be normalised to a CellValue
unsupported_workbook_featureA non-cell object/sheet type is present but not compared
unsupported_workbook_metadataA defined-name / visibility / metadata change was detected
defined_name_scope_unknownDefined-name scope is unavailable from the reader
datetime_not_normalizedA date/time value could not be normalised to ISO form
limit_truncated_cellsA configured cell limit truncated the comparison
alignment_bound_exceededThe alignment row-product bound was exceeded; fell back to positional
duplicate_alignment_keyTwo or more rows shared the same alignment key

New codes added in later minor versions will extend this table; existing rows are stable.

Trait Implementations§

Source§

impl Clone for DiagnosticKind

Source§

fn clone(&self) -> DiagnosticKind

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for DiagnosticKind

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Eq for DiagnosticKind

Source§

impl PartialEq for DiagnosticKind

Source§

fn eq(&self, other: &DiagnosticKind) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for DiagnosticKind

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.