Update documentation of `validate`

This commit is contained in:
Hanno Braun 2022-11-09 11:54:40 +01:00
parent 899b401265
commit c874a9cef2
1 changed files with 3 additions and 15 deletions

View File

@ -1,18 +1,4 @@
//! Infrastructure for validating shapes //! Infrastructure for validating objects
//!
//! Validation enforces various constraints about shapes and the objects that
//! constitute them. These constraints fall into 4 categories:
//!
//! - **Coherence:** Local forms of objects must be consistent with their
//! canonical forms.
//! - **Geometric:** Comprises various object-specific constraints, for example
//! edges or faces might not be allowed to intersect.
//! - **Structural:** All other objects that an object references must be part
//! of the same shape.
//! - **Uniqueness:** Objects within a shape must be unique.
//!
//! Please note that not all of these validation categories are fully
//! implemented, as of this writing.
mod curve; mod curve;
mod cycle; mod cycle;
@ -36,6 +22,8 @@ use std::convert::Infallible;
use fj_math::Scalar; use fj_math::Scalar;
/// Validate an object /// Validate an object
///
/// This trait is used automatically when inserting an object into a store.
pub trait Validate: Sized { pub trait Validate: Sized {
/// The error that validation of the implementing type can result in /// The error that validation of the implementing type can result in
type Error: Into<ValidationError>; type Error: Into<ValidationError>;