parse_rust_schema/lib.rs
1//! Field types, inference, validation, and the `_SCHEMA` storage format.
2//!
3//! Parse's schema is *implicit*: the first write that mentions a field decides its type, and every
4//! later write is checked against that decision. This crate owns that machinery. It performs no
5//! I/O; loading and persisting a schema belongs to the storage adapter.
6//!
7//! `storage_format` is the highest-risk module in the crate, because `_SCHEMA` is shared with any
8//! parse-server reading the same database and both of its failure modes are silent.
9
10#![forbid(unsafe_code)]
11#![cfg_attr(
12 not(test),
13 deny(clippy::unwrap_used, clippy::expect_used, clippy::panic)
14)]
15
16pub mod controller;
17pub mod infer;
18pub mod storage_format;
19
20pub use controller::{apply, default_schema, validate_write, SchemaDelta};
21pub use infer::{class_name_is_valid, field_name_is_valid, infer_type};
22pub use parse_rust_storage::{ClassSchema, FieldType};