#[non_exhaustive]pub enum LoadError {
Io {
path: String,
source: Error,
},
ExternalResource(ExternalResourceFailure),
Gltf(Error),
SourceFacts(SourceFactsError),
Buffer(String),
Malformed(String),
Topology(String),
PrimitiveEncoding {
mesh: usize,
primitive: usize,
attribute: String,
accessor: usize,
found: String,
expected: String,
},
PrimitiveAccessorLayout {
mesh: usize,
primitive: usize,
attribute: String,
accessor: usize,
problem: String,
},
AnimationAccessorLayout {
clip: String,
node: usize,
slot: &'static str,
accessor: usize,
problem: String,
},
AnimationEncoding {
animation: usize,
sampler: usize,
slot: &'static str,
node: usize,
property: &'static str,
accessor: usize,
found: String,
expected: String,
},
}Expand description
Errors returned while loading .gltf or .glb input.
These are structural or operator errors. Semantic animation defects,
such as non-unit quaternions or seam pops, load successfully and are
reported by animsmith-core checks.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Io
The source file or one of its external buffers could not be read.
ExternalResource(ExternalResourceFailure)
A rooted external dependency required to construct the document failed.
Gltf(Error)
The gltf parser rejected the container.
SourceFacts(SourceFactsError)
The format-neutral source-facts projection contradicted a core invariant.
Buffer(String)
Buffer resolution or GLB framing failed.
Malformed(String)
Animation data is structurally malformed.
Topology(String)
The node graph is not a forest that can become a skeleton.
PrimitiveEncoding
A primitive’s vertex-attribute or index accessor declares an element
encoding the loader cannot read as authored. Either the file
contradicts the glTF vertex-attribute rules (a VEC3 TEXCOORD_0, or
an integer TEXCOORD_0/WEIGHTS_0 without normalized: true), or it
uses a spec-permitted encoding the gltf crate’s reader has no decoder
for (a KHR_mesh_quantization POSITION). The message reports the
encodings that slot accepts.
Fields
PrimitiveAccessorLayout
A primitive’s vertex-attribute or index accessor declares an element
the loader does read, but addresses its bytes in a way the reader
cannot walk: a buffer view whose own extent overflows, exceeds its
buffer declaration, or exceeds the bytes that actually resolved; a
byteStride shorter than the element it strides over; a sparse
block of count 0; or a count/byteOffset whose required extent
overflows or exceeds its buffer view. gltf’s Validate
relates an accessor to none of these. The first shapes can panic in
the reader; a merely short extent instead makes the reader return
None, which is equally unsafe to substitute with empty geometry.
Fields
AnimationAccessorLayout
An animation sampler’s input or output accessor addresses its
bytes in a way the reader cannot walk — the same layout shapes
Self::PrimitiveAccessorLayout names, reached through
read_inputs/read_outputs instead of through a primitive.
This is the sampler’s layout, not its encoding: an accessor typed for a different element than the sampler’s reader decodes is a separate class and is not judged here.
Fields
AnimationEncoding
An animation sampler’s input or output accessor declares an
element encoding the property-specific reader cannot decode. The
reader always expects scalar FLOAT key times; outputs are VEC3 of
FLOAT for translation/scale, or one of glTF’s five component
encodings as VEC4 rotation and scalar morph weights.
Fields
Trait Implementations§
Source§impl Error for LoadError
impl Error for LoadError
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()