pub enum GeometryError {
Show 18 variants
ByteSizeOverflow,
ByteLength {
kind: &'static str,
actual: usize,
expected: usize,
},
DuplicateSemantic(String),
AttributeCount {
semantic: String,
actual: usize,
expected: usize,
},
MissingPosition,
EmptyGeometry,
AttributeComponents {
semantic: String,
actual: u8,
expected: &'static str,
},
AttributeComponentType {
semantic: String,
component_type: ComponentType,
normalized: bool,
profile: ValidationProfile,
},
NonFinitePosition,
InvalidElementCount {
mode: PrimitiveMode,
count: usize,
},
InvalidPrimitiveMode(u32),
InvalidComponents(u8),
InvalidIndexType(ComponentType),
IndexOutOfRange {
index: u64,
vertex_count: usize,
},
DracoAccessorCount {
semantic: String,
decoded: u64,
declared: u64,
},
ComponentTypeProfile {
component_type: ComponentType,
profile: ValidationProfile,
},
UnsupportedDraco(String),
MorphTargetCount {
expected: usize,
actual: usize,
},
}Expand description
Validation errors for materialized primitive geometry.
Variants§
ByteSizeOverflow
A byte-size calculation overflowed the addressable range.
ByteLength
A byte payload does not match its declared accessor layout.
Fields
DuplicateSemantic(String)
An attribute semantic occurs more than once.
AttributeCount
Vertex attributes do not agree on their element count.
Fields
MissingPosition
A primitive has no POSITION attribute.
EmptyGeometry
A primitive has no vertices.
AttributeComponents
A well-known attribute has the wrong number of components.
Fields
AttributeComponentType
A well-known attribute uses storage forbidden by the selected profile.
Fields
component_type: ComponentTypeRejected scalar storage type.
profile: ValidationProfileActive validation profile.
NonFinitePosition
A floating-point POSITION value cannot be represented in JSON bounds.
InvalidElementCount
The number of vertices or indices is invalid for the primitive mode.
Fields
mode: PrimitiveModePrimitive topology.
InvalidPrimitiveMode(u32)
A primitive mode code is outside the glTF core range.
InvalidComponents(u8)
A component count is not valid for primitive attributes.
InvalidIndexType(ComponentType)
An index accessor uses a component type forbidden by the profile.
IndexOutOfRange
An index references a vertex outside the attribute range.
DracoAccessorCount
Decoded Draco topology disagrees with its glTF accessor metadata.
Fields
ComponentTypeProfile
A component type is outside the selected validation profile.
Fields
component_type: ComponentTypeRejected component type.
profile: ValidationProfileActive validation profile.
UnsupportedDraco(String)
Draco cannot represent the supplied geometry without conversion.
MorphTargetCount
Existing morph targets would become invalid after replacement.
Trait Implementations§
Source§impl Clone for GeometryError
impl Clone for GeometryError
Source§fn clone(&self) -> GeometryError
fn clone(&self) -> GeometryError
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 GeometryError
impl Debug for GeometryError
Source§impl Display for GeometryError
impl Display for GeometryError
impl Eq for GeometryError
Source§impl Error for GeometryError
impl Error for GeometryError
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()