Skip to main content

id_effect/schema/
mod.rs

1//! **Stratum 13 — Data & Schema**
2//!
3//! Type-safe data representation and validation, built from Strata 0–12.
4//!
5//! | Submodule | Provides | Depends on |
6//! |-----------|----------|------------|
7//! | [`brand`] | [`Brand`], [`RefinedBrand`] | Stratum 0 |
8//! | [`equal`] | [`Equal`], [`EffectHash`] | Stratum 0 |
9//! | [`data`] | [`EffectData`], [`DataStruct`], [`DataTuple`], [`DataError`] | [`equal`] |
10//! | [`order`] | [`DynOrder`], [`Ordering`], `ordering`, `order` | Stratum 0 |
11//! | [`parse`] | [`Schema`], [`ParseError`], [`Unknown`], primitives, `tuple`/`tuple3`/`tuple4`, `struct_`/`struct3`/`struct4`, … | [`data`] |
12//! | [`extra`] | [`record`], [`suspend`], [`union_chain`], literals, [`wire_equal`](extra::wire_equal), [`null_or`](extra::null_or) | [`parse`] |
13//! | [`parse_errors`] | [`ParseErrors`] | [`parse`] |
14//! | [`has_schema`] | [`HasSchema`] | [`parse`] |
15//! | [`serde_bridge`] | JSON → [`Unknown`] (`schema-serde` feature) | [`parse`], `serde_json` |
16//! | [`json_schema_export`] | Primitive JSON Schema fragments (`schema-serde`) | `serde_json` |
17//!
18//! ## Public API
19//!
20//! Re-exported at the crate root: all public types and functions.
21
22pub mod brand;
23pub mod data;
24pub mod equal;
25pub mod extra;
26pub mod has_schema;
27pub mod order;
28pub mod parse;
29pub mod parse_errors;
30pub mod redacted;
31
32#[cfg(feature = "schema-serde")]
33pub mod json_schema_export;
34#[cfg(feature = "schema-serde")]
35pub mod serde_bridge;
36
37pub use brand::{Brand, RefinedBrand};
38pub use data::{DataError, DataStruct, DataTuple, EffectData};
39pub use equal::{EffectHash, Equal, combine, equals, hash, hash_string, hash_structure};
40pub use extra::{literal_i64, literal_string, null_or, record, suspend, union_chain, wire_equal};
41pub use has_schema::HasSchema;
42pub use order::{DynOrder, Ordering, ordering};
43pub use parse::{
44  ParseError, Schema, Unknown, array, bool_, f64, filter, i64, i64_unknown_wire, optional, refine,
45  string, struct_, struct3, struct4, transform, tuple, tuple3, tuple4, union_,
46};
47pub use parse_errors::ParseErrors;
48pub use redacted::Redacted;
49
50#[cfg(feature = "schema-serde")]
51pub use json_schema_export::{
52  type_array, type_boolean, type_integer, type_number, type_record, type_string,
53};
54#[cfg(feature = "schema-serde")]
55pub use serde_bridge::unknown_from_serde_json;