#[non_exhaustive]pub enum DecodeError {
Show 14 variants
WrongShape {
at: String,
expected: &'static str,
},
MissingField {
field: &'static str,
},
IndexOutOfRange {
at: String,
index: u32,
vertex_count: usize,
},
NotTriangles {
index_count: usize,
},
NonTriangleFace {
face: usize,
vertex_count: u64,
},
CountMismatch {
field: &'static str,
counted: u64,
available: usize,
},
CurveTooShort {
curve: usize,
vertex_count: u64,
},
NonAffineTransform {
last_column: [f64; 4],
},
UnknownToken {
at: String,
token: String,
expected: &'static str,
},
LengthMismatch {
field: &'static str,
len: usize,
expected: usize,
},
InvalidBase64 {
at: String,
reason: String,
},
ByteLength {
at: String,
bytes: usize,
element_size: usize,
},
InvalidPcd {
reason: String,
},
UnsupportedPcd {
reason: String,
},
}Expand description
Why an attribute value could not be decoded into geometry.
at fields locate the offending value inside the attribute value, for
example points[3][1] or faceVertexIndices[7].
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
WrongShape
A value does not have the JSON shape the attribute requires.
MissingField
A required field of an object-valued attribute is absent.
IndexOutOfRange
A vertex index points past the end of the vertex list.
NotTriangles
A triangle index list whose length is not a multiple of three.
NonTriangleFace
A face that is not a triangle, from faceVertexCounts.
CountMismatch
Per-face or per-curve vertex counts that do not add up to the number of indices or points they describe.
CurveTooShort
A curve with fewer than two vertices, which cannot form a line.
NonAffineTransform
A 4×4 transform whose last column is not (0, 0, 0, 1).
UnknownToken
A string that is not one of the tokens the attribute allows.
Fields
LengthMismatch
Two lists that must have one entry each, such as point colours and positions, differ in length.
InvalidBase64
A base64 string is malformed.
ByteLength
Decoded binary data is not a whole number of elements.
InvalidPcd
A PCD header or data section is malformed or truncated.
UnsupportedPcd
A well-formed PCD file in a layout the upstream viewer cannot read
either, such as f64 coordinates or DATA binary_lz4.
Trait Implementations§
Source§impl Clone for DecodeError
impl Clone for DecodeError
Source§fn clone(&self) -> DecodeError
fn clone(&self) -> DecodeError
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more