pub enum DataError {
Show 13 variants
TypeMismatch,
InvalidLiteral,
InvalidUtf8,
Overflow,
NonFinite,
InexactConversion,
DivisionByZero,
InvalidShape,
ShapeMismatch,
Bounds,
InvalidSlice,
InvalidMetadata,
AllocationLimit,
}Expand description
Failure to construct, index, convert, or evaluate typed data.
Variants§
TypeMismatch
An operation requires operands with the same declared element type.
InvalidLiteral
Text is not a valid literal of the requested type.
InvalidUtf8
Bytes are not valid UTF-8 where a text value is required.
Overflow
A value or checked integer operation exceeds the destination range.
NonFinite
Infinity and NaN cannot enter a portable data value.
InexactConversion
A conversion would round, truncate, or discard a signed zero.
DivisionByZero
Division or remainder has a zero divisor.
InvalidShape
Shape, rank, or buffer length is not a valid tensor layout.
ShapeMismatch
Shapes cannot participate in the requested operation.
Bounds
An index is outside the requested value.
InvalidSlice
Slice selectors are malformed, including a zero step.
InvalidMetadata
Decoded media metadata disagrees with its payload.
AllocationLimit
A checked allocation exceeds the portable data limit.
Implementations§
Trait Implementations§
impl Copy for DataError
Source§impl<'de> Deserialize<'de> for DataError
impl<'de> Deserialize<'de> for DataError
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl Eq for DataError
Source§impl Error for DataError
impl Error for DataError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()