1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
//! VSF Schema System - Type-safe section and field validation
//!
//! This module provides schema definitions for VSF sections, enabling:
//! - Type-safe section builders with Rust-native syntax
//! - Field validation against allowed values
//! - Round-trip parsing: VSF → Struct → VSF
//! - Automatic error messages for invalid fields
//!
//! ## Architecture
//!
//! - **SectionSchema**: Defines allowed fields for a section type
//! - **FieldSchema**: Defines field name, type constraints, validation rules
//! - **SchemaRegistry**: Registry of official VSF section types
//! - **UserRegistry**: Registry for application-specific sections
//!
//! ## Design Principles
//!
//! 1. **Order Independence**: Field order doesn't matter (except z, y, b in header)
//! 2. **Parse → Modify → Encode**: Support round-trip modifications
//! 3. **Compile-time Safety**: Use Rust type system where possible
//! 4. **Runtime Validation**: Schema enforcement for dynamic sections
//!
//! ## Example
//!
//! ```ignore
//! // Define schema
//! let image_schema = SectionSchema::new("image")
//! .field("iso", FieldType::U16)
//! .field("shutter_speed", FieldType::F32)
//! .field("aperture", FieldType::F32);
//!
//! // Build section with validation
//! let section = image_schema.build()
//! .set("iso", 400)?
//! .set("shutter_speed", 1.0/125.0)?
//! .set("aperture", 2.8)?
//! .encode()?;
//!
//! // Parse and validate
//! let parsed = image_schema.parse(&bytes)?;
//! assert_eq!(parsed.get::<u16>("iso")?, 400);
//! ```
pub use TypeConstraint;
pub use ;
pub use FieldSchema;
pub use register_official_schemas;
pub use ;
pub use ;
pub use ;
/// Prelude for common schema operations