#[non_exhaustive]pub enum ValueMissing {
UnsetScalar {
data_type: DataType,
},
UnsetCollection {
data_type: DataType,
},
EmptyCollection {
data_type: DataType,
},
EmptyCollectionConversion {
to: DataType,
},
Conversion {
from: DataType,
to: DataType,
},
CollectionItem {
source_index: usize,
from: DataType,
to: DataType,
},
}Expand description
Describes the typed state that produced a missing-value error.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
UnsetScalar
A scalar was unset with a declared data type.
UnsetCollection
A collection was unset with a declared element type.
EmptyCollection
A concrete collection contains no item for a first-item read.
EmptyCollectionConversion
A conversion requested one item from an empty collection.
The source collection has no item and therefore no source value type
can be recovered from the shared conversion error. to records the
requested target type instead of overloading EmptyCollection.
Conversion
A conversion policy treated a concrete scalar as missing.
CollectionItem
A collection item conversion produced no value.
Implementations§
Source§impl ValueMissing
impl ValueMissing
Sourcepub const fn source_type(self) -> Option<DataType>
pub const fn source_type(self) -> Option<DataType>
Returns the source or declared data type associated with the error.
Returns None for Self::EmptyCollectionConversion because no source
item exists for that conversion.
Sourcepub const fn target_type(self) -> Option<DataType>
pub const fn target_type(self) -> Option<DataType>
Returns the requested target type for conversion failures.
Sourcepub const fn source_index(self) -> Option<usize>
pub const fn source_index(self) -> Option<usize>
Returns the source index for a missing collection item.
Sourcepub const fn is_empty_collection(self) -> bool
pub const fn is_empty_collection(self) -> bool
Reports whether a concrete collection is empty.
Sourcepub const fn is_conversion(self) -> bool
pub const fn is_conversion(self) -> bool
Reports whether the missing value came from a conversion.
Trait Implementations§
Source§impl Clone for ValueMissing
impl Clone for ValueMissing
Source§fn clone(&self) -> ValueMissing
fn clone(&self) -> ValueMissing
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more