#[non_exhaustive]pub enum ValueMissingReason {
UnsetScalar,
UnsetCollection,
EmptyCollection,
Conversion,
}Expand description
Identifies why a read could not produce a concrete value.
The reason is independent of the source and target types. Inspect the
accompanying crate::ValueMissing accessors for those types and for a
collection index when one is available.
§Examples
use qubit_datatype::DataType;
use qubit_value::Value;
use qubit_value::ValueMissingReason;
let error = Value::new_unset(DataType::Int32)
.get::<i32>()
.unwrap_err();
assert_eq!(error.missing().unwrap().reason(), ValueMissingReason::UnsetScalar);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.
UnsetScalar
Scalar storage is unset with a declared type.
UnsetCollection
Collection storage is unset with a declared element type.
EmptyCollection
A concrete collection has no first item.
Conversion
Conversion policy classified a concrete scalar or collection item as missing.
Trait Implementations§
Source§impl Clone for ValueMissingReason
impl Clone for ValueMissingReason
impl Copy for ValueMissingReason
Source§impl Debug for ValueMissingReason
impl Debug for ValueMissingReason
impl Eq for ValueMissingReason
Source§impl Hash for ValueMissingReason
impl Hash for ValueMissingReason
Source§impl PartialEq for ValueMissingReason
impl PartialEq for ValueMissingReason
impl StructuralPartialEq for ValueMissingReason
Auto Trait Implementations§
impl Forget for ValueMissingReason
impl Freeze for ValueMissingReason
impl Move for ValueMissingReason
impl RefUnwindSafe for ValueMissingReason
impl Send for ValueMissingReason
impl Sync for ValueMissingReason
impl Unpin for ValueMissingReason
impl UnsafeUnpin for ValueMissingReason
impl UnwindSafe for ValueMissingReason
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