yog_data/lib.rs
1//! Yog Data: one data model, text syntax, binary form and schema system for
2//! every Yog format, the build, the ABI and the IDE — the way Minecraft has
3//! NBT. See `docs/design/yog-data.md`.
4//!
5//! - [`Value`]: the model — JSON's values plus typed ones (content
6//! references, tags, mod resources, Yog text, images, colors);
7//! - [`text`]: JSON with comments, trailing commas and unquoted keys,
8//! parsed with the position of every value;
9//! - [`typed`]: the one grammar of the typed values' string forms
10//! (`@item:minecraft:stick`, `@tag:item:minecraft:planks`, `@Strings.title`);
11//! - [`binary`]: the compact tagged form content crosses the ABI in.
12
13// `::yog_data::…` paths of `#[derive(Schema)]` work inside this crate too.
14extern crate self as yog_data;
15
16pub mod binary;
17pub mod text;
18#[cfg(feature = "toml")]
19pub mod toml;
20pub mod typed;
21mod value;
22pub mod with;
23
24pub use text::{Doc, LineCol, Span, Spans, SyntaxError};
25pub use value::{Map, Path, Ref, Res, Seg, Value};
26pub mod schema;
27
28pub use schema::{
29 BlockId, Color, EntityId, Errors, Id, Image, ItemId, ItemIdOrTag, Kind, Kinds, OneOrTag,
30 Ordered, Read, Reader, RecipeId, Resolve, Schema, Shape, TagId, Text, from_doc_with, from_text,
31 from_value, from_value_with, kinds, to_text,
32};
33pub use yog_data_derive::Schema;