Skip to main content

GeometryError

Enum GeometryError 

Source
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

§kind: &'static str

Kind of payload being checked.

§actual: usize

Actual byte length.

§expected: usize

Expected byte length.

§

DuplicateSemantic(String)

An attribute semantic occurs more than once.

§

AttributeCount

Vertex attributes do not agree on their element count.

Fields

§semantic: String

Attribute semantic.

§actual: usize

Actual element count.

§expected: usize

Expected element count.

§

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

§semantic: String

Attribute semantic.

§actual: u8

Actual component count.

§expected: &'static str

Required component count.

§

AttributeComponentType

A well-known attribute uses storage forbidden by the selected profile.

Fields

§semantic: String

Attribute semantic.

§component_type: ComponentType

Rejected scalar storage type.

§normalized: bool

Whether normalized integer interpretation was requested.

§profile: ValidationProfile

Active 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: PrimitiveMode

Primitive topology.

§count: usize

Number of indexed or non-indexed elements.

§

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.

Fields

§index: u64

Invalid vertex index.

§vertex_count: usize

Number of vertices in the primitive.

§

DracoAccessorCount

Decoded Draco topology disagrees with its glTF accessor metadata.

Fields

§semantic: String

Attribute semantic or indices.

§decoded: u64

Count materialized from the Draco stream.

§declared: u64

Count declared by the glTF accessor.

§

ComponentTypeProfile

A component type is outside the selected validation profile.

Fields

§component_type: ComponentType

Rejected component type.

§profile: ValidationProfile

Active validation profile.

§

UnsupportedDraco(String)

Draco cannot represent the supplied geometry without conversion.

§

MorphTargetCount

Existing morph targets would become invalid after replacement.

Fields

§expected: usize

Existing morph-target element count.

§actual: usize

Replacement vertex count.

Trait Implementations§

Source§

impl Clone for GeometryError

Source§

fn clone(&self) -> GeometryError

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for GeometryError

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Display for GeometryError

Source§

fn fmt(&self, __formatter: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Eq for GeometryError

Source§

impl Error for GeometryError

1.30.0 · Source§

fn source(&self) -> Option<&(dyn Error + 'static)>

Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§

fn description(&self) -> &str

👎Deprecated since 1.42.0:

use the Display impl or to_string()

1.0.0 · Source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0:

replaced by Error::source, which can support downcasting

Source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type-based access to context intended for error reports. Read more
Source§

impl From<GeometryError> for Error

Source§

fn from(source: GeometryError) -> Self

Converts to this type from the input type.
Source§

impl PartialEq for GeometryError

Source§

fn eq(&self, other: &GeometryError) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for GeometryError

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.