pub enum StorageCoerceError {
Unsupported {
from: &'static str,
to: &'static str,
},
OutOfRange {
from: &'static str,
to: &'static str,
index: Option<usize>,
},
NonFinite {
to: &'static str,
index: Option<usize>,
},
PrecisionLoss {
to: &'static str,
index: Option<usize>,
},
NotIntegral {
to: &'static str,
index: Option<usize>,
},
MissingValue {
to: &'static str,
index: Option<usize>,
},
InvalidUtf8 {
index: Option<usize>,
},
Batched {
container: &'static str,
listed: Vec<StorageCoerceError>,
total: usize,
},
}Expand description
Error type for storage-directed conversion failures.
Variants§
Unsupported
Conversion between these types is not supported.
OutOfRange
Value is out of range for the target type.
Fields
NonFinite
Value is non-finite (NaN or Inf) but target requires finite.
Fields
PrecisionLoss
Conversion would lose precision.
Fields
NotIntegral
Float value is not integral but target is integer type.
Fields
MissingValue
Missing value (NA) cannot be represented in target type.
Fields
InvalidUtf8
Invalid UTF-8 in string conversion.
Batched
Aggregated per-element failures from a vector conversion (#1097).
listed holds at most the first BATCHED_ERROR_CAP element errors
(each with index set); total counts all failures.
Implementations§
Trait Implementations§
Source§impl Clone for StorageCoerceError
impl Clone for StorageCoerceError
Source§fn clone(&self) -> StorageCoerceError
fn clone(&self) -> StorageCoerceError
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for StorageCoerceError
impl Debug for StorageCoerceError
Source§impl Display for StorageCoerceError
impl Display for StorageCoerceError
Source§impl Eq for StorageCoerceError
impl Eq for StorageCoerceError
Source§#[doc(hidden)]fn assert_fields_are_eq(&self)
#[doc(hidden)]fn assert_fields_are_eq(&self)
derive_eq_internals)1.0.0 (const: unstable) · Source§#[doc(hidden)]fn assert_receiver_is_total_eq(&self)
#[doc(hidden)]fn assert_receiver_is_total_eq(&self)
implementation detail of #[derive(Eq)]
Source§impl Error for StorageCoerceError
impl Error for StorageCoerceError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Source§#[doc(hidden)]fn type_id(&self, _: Internal) -> TypeIdwhere
Self: 'static,
#[doc(hidden)]fn type_id(&self, _: Internal) -> TypeIdwhere
Self: 'static,
error_type_id)TypeId of self.1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
Source§impl PartialEq for StorageCoerceError
impl PartialEq for StorageCoerceError
impl StructuralPartialEq for StorageCoerceError
Auto Trait Implementations§
impl Freeze for StorageCoerceError
impl RefUnwindSafe for StorageCoerceError
impl Send for StorageCoerceError
impl Sync for StorageCoerceError
impl Unpin for StorageCoerceError
impl UnsafeUnpin for StorageCoerceError
impl UnwindSafe for StorageCoerceError
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> RDisplay for Twhere
T: Display,
impl<T> RDisplay for Twhere
T: Display,
Source§fn as_r_string(&self) -> String
fn as_r_string(&self) -> String
Source§impl<T> RError for Twhere
T: Error,
impl<T> RError for Twhere
T: Error,
Source§fn error_message(&self) -> String
fn error_message(&self) -> String
Source§fn error_chain(&self) -> Vec<String>
fn error_chain(&self) -> Vec<String>
Source§fn error_chain_length(&self) -> i32
fn error_chain_length(&self) -> i32
Source§impl<T> SizeHint for Twhere
T: ?Sized,
impl<T> SizeHint for Twhere
T: ?Sized,
Source§default fn lower_bound(&self) -> usize
default fn lower_bound(&self) -> usize
core_io_internals)[u8; 12] could return any value between 0 and
12 inclusively as a correct implementation. Read moreSource§impl<T> SizedTypeProperties for T
impl<T> SizedTypeProperties for T
Source§#[doc(hidden)]const SIZE: usize = _
#[doc(hidden)]const SIZE: usize = _
sized_type_properties)Source§#[doc(hidden)]const ALIGN: usize = _
#[doc(hidden)]const ALIGN: usize = _
sized_type_properties)Source§#[doc(hidden)]const ALIGNMENT: Alignment = _
#[doc(hidden)]const ALIGNMENT: Alignment = _
ptr_alignment_type)Source§#[doc(hidden)]const IS_ZST: bool = _
#[doc(hidden)]const IS_ZST: bool = _
sized_type_properties)Source§#[doc(hidden)]const LAYOUT: Layout = _
#[doc(hidden)]const LAYOUT: Layout = _
sized_type_properties)Source§#[doc(hidden)]const MAX_SLICE_LEN: usize = _
#[doc(hidden)]const MAX_SLICE_LEN: usize = _
sized_type_properties)[Self]. Read moreLayout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...) attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 56 bytes
Size for each variant:
Unsupported: 32 bytesOutOfRange: 48 bytesNonFinite: 32 bytesPrecisionLoss: 32 bytesNotIntegral: 32 bytesMissingValue: 32 bytesInvalidUtf8: 16 bytesBatched: 48 bytes