#[non_exhaustive]pub enum ListKeyReason {
MissingField {
segment: String,
},
DuplicateField {
segment: String,
},
NotAnObject {
segment: String,
},
NotAnIdentity {
kind: &'static str,
},
NotASafeInteger,
Duplicate {
first_row: usize,
},
RowShape {
roots: usize,
stray_content: bool,
},
AuthoredKey,
UnbalancedRow,
}Expand description
Why a keyed row was refused (ListKeyViolation::reason).
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
MissingField
The row, or an object on the path, has no field of that name.
DuplicateField
The row, or an object on the path, declares the field twice, so the key would be whichever one a reader happened to take.
NotAnObject
A value on the path before the last segment is not an object.
NotAnIdentity
The value at the path is not a string or a safe integer: null, a
boolean, an array or an object.
NotASafeInteger
The value at the path is a number that is not an integer within ±(2^53 − 1): a fraction, an infinity, NaN or a larger magnitude.
Duplicate
Another row of the same list execution already rendered this key. The key itself is not carried: it is the row’s data, and a diagnostic names positions, never private values.
RowShape
The row body did not render exactly one root element to carry the key: no element, more than one, or text, a dynamic range or an island envelope that does not wholly enclose the root beside it.
Fields
AuthoredKey
The row’s root carries an authored data-forma-key (static or
dynamic); the attribute is the compiler-written identity and nothing
else may set it.
UnbalancedRow
The row closed an element it did not open, or left one open at its end, so its root is not one balanced element at the row’s level.