#[non_exhaustive]pub enum Error {
InvalidSize,
InvalidIndex,
Overflow,
BufferMismatch,
InvalidData,
UnsupportedFormat,
}Expand description
Errors produced by core construction and validation paths. 核心构造与校验路径产生的错误。
Construction uses checked_* arithmetic and explicit limits, so oversized or malformed inputs return an error instead of overflowing or panicking.
构造使用 checked_* 算术和显式限制,因此过大或畸形的输入会返回错误,而不是溢出或 panic。
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
InvalidSize
A dimension or size is zero, negative, or exceeds a configured limit. 维度或大小为 0、为负,或超过配置的限制。
InvalidIndex
An index falls outside the valid range. 索引超出有效范围。
Overflow
An arithmetic operation (e.g. buffer sizing) would overflow. 算术运算(如缓冲区大小计算)会溢出。
BufferMismatch
A buffer length does not match its declared dimensions. 缓冲区长度与其声明的维度不匹配。
InvalidData
Input data is structurally invalid (empty mesh, non-triangle count, etc.). 输入数据在结构上无效(空网格、非三角形的顶点数等)。
UnsupportedFormat
The input is a recognized format that this build does not support (e.g. an image format compiled out by a feature). 输入是一种已识别、但当前构建不支持的格式(例如被某个特性编译掉的图像格式)。