pub enum ExportError {
NoRenderGeometry,
TooLarge {
bytes: u64,
},
Serialization {
stage: &'static str,
detail: String,
},
MalformedMeshInput {
detail: String,
},
}Expand description
A failure the caller must handle; completion of a try_export_* function
implies a non-empty artifact.
Variants§
NoRenderGeometry
The visible mesh set was empty: the model has no render geometry (or the
caller’s visibility filters removed all of it). The export would not be a
valid file: an empty GLB has empty accessors, bufferViews, meshes
and nodes arrays (glTF schema minItems: 1) and a zero
buffers[0].byteLength (schema minimum: 1), and an empty COLLADA
document has empty libraries its schema requires children in. Some
downstream tools still accept such a file silently, so this is surfaced
as an error rather than an artifact.
TooLarge
The projected single-GLB output exceeds the glTF 32-bit (4 GiB) container
/ buffer limit — the model is too large for one GLB and must be exported
as a multi-buffer glTF instead. Carries the projected total container size
in bytes (from pass 1), so a caller can log it or size a buffer split
without re-meshing. Replaces the historical 4 GiB panic! on the checked
export paths (issue #1516).
Fields
bytes: u64Projected total GLB container size in bytes (may be a lower bound once
oversize; see crate::GlbSizeProjection::total_bytes).
Serialization
A downstream encoder (Arrow/Parquet columnar writer, ZIP container, or
JSON serializer) rejected the data it was handed. This is an I/O/library
failure rather than a business-logic outcome — replaces panicking
.unwrap()/.expect() calls on writer/serializer results so a malformed
or resource-exhausted encode returns an error instead of unwinding the
whole export (see the parquet_bos exporter).
Fields
MalformedMeshInput
A from-meshes writer was handed inconsistent inputs. Two shapes, and they fail differently:
- a COUNT that runs past a buffer — the per-mesh
vertex_counts/index_countssum past the end of the flattenedpositions/normals/indices. The infalliblecrate::export_glb_from_meshessilently drops the un-backed tail (a valid GLB missing part of the model, reported as success); - an index BLOCK that is not whole triangles, or an index VALUE that is not a vertex of its own mesh. The GLB assembler copies the index buffer verbatim, so either reaches the file and glTF-Validator rejects the result (glTF 2.0 3.7.2.1).
try_export_glb_from_meshes and try_export_collada_from_meshes surface
both, through one index-block predicate (#4684), so a caller bug can’t
ship truncated or invalid geometry from either.
Implementations§
Trait Implementations§
Source§impl Clone for ExportError
impl Clone for ExportError
Source§fn clone(&self) -> ExportError
fn clone(&self) -> ExportError
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ExportError
impl Debug for ExportError
Source§impl Display for ExportError
impl Display for ExportError
Source§impl Error for ExportError
impl Error for ExportError
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
Source§impl PartialEq for ExportError
impl PartialEq for ExportError
impl Eq for ExportError
impl StructuralPartialEq for ExportError
Auto Trait Implementations§
impl Freeze for ExportError
impl RefUnwindSafe for ExportError
impl Send for ExportError
impl Sync for ExportError
impl Unpin for ExportError
impl UnwindSafe for ExportError
Blanket Implementations§
§impl<U> As for U
impl<U> As for U
§fn as_<T>(self) -> Twhere
T: CastFrom<U>,
fn as_<T>(self) -> Twhere
T: CastFrom<U>,
self to type T. The semantics of numeric casting with the as operator are followed, so <T as As>::as_::<U> can be used in the same way as T as U for numeric conversions. Read moreSource§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more§impl<T> Pointable for T
impl<T> Pointable for T
§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.