pub enum ValidationLevel {
Minimal,
Standard,
Strict,
Paranoid,
}Expand description
Level of validation to perform.
This enum defines four progressively stricter validation modes. Higher levels include all checks from lower levels.
Variants§
Minimal
Basic structural checks (required attributes, valid XML).
Very fast (< 1ms). Suitable for quick sanity checks during development.
Checks:
- Required attributes present
- Valid data types (numbers parse, IDs are positive)
- No obviously malformed structures
Standard
Full 3MF Core Spec compliance (resource IDs, reference integrity).
Fast (< 10ms). Recommended for production use.
Includes all Minimal checks plus:
- Resource IDs are unique
- Build items reference valid objects
- Material/property references are valid
- Component references form valid DAG (no cycles)
- Vertex indices within mesh bounds
Strict
Strict adherence to spec (metadata, no unknown attributes).
Moderate performance. Suitable for conformance testing and quality assurance.
Includes all Standard checks plus:
- Metadata requirements enforced
- No unknown attributes or elements
- Extension namespaces correctly declared
- Proper content type and relationship registration
Paranoid
Deep geometry inspection (manifold checks, intersection tests).
Slow (can be seconds for complex models). Use for critical manufacturing workflows.
Includes all Strict checks plus:
- Mesh manifoldness (edge-manifold and vertex-manifold)
- Self-intersection detection (BVH-accelerated, still O(n²) worst case)
- Orientation consistency (outward-facing normals)
- Degenerate triangle detection
- Connected component analysis
- Type-specific geometry constraints
Trait Implementations§
Source§impl Clone for ValidationLevel
impl Clone for ValidationLevel
Source§fn clone(&self) -> ValidationLevel
fn clone(&self) -> ValidationLevel
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ValidationLevel
impl Debug for ValidationLevel
Source§impl<'de> Deserialize<'de> for ValidationLevel
impl<'de> Deserialize<'de> for ValidationLevel
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl Ord for ValidationLevel
impl Ord for ValidationLevel
Source§fn cmp(&self, other: &ValidationLevel) -> Ordering
fn cmp(&self, other: &ValidationLevel) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialEq for ValidationLevel
impl PartialEq for ValidationLevel
Source§impl PartialOrd for ValidationLevel
impl PartialOrd for ValidationLevel
Source§impl Serialize for ValidationLevel
impl Serialize for ValidationLevel
impl Copy for ValidationLevel
impl Eq for ValidationLevel
impl StructuralPartialEq for ValidationLevel
Auto Trait Implementations§
impl Freeze for ValidationLevel
impl RefUnwindSafe for ValidationLevel
impl Send for ValidationLevel
impl Sync for ValidationLevel
impl Unpin for ValidationLevel
impl UnwindSafe for ValidationLevel
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
Source§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<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.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