Expand description
Modules§
- kinds
- The kinds every Yog format knows.
Structs§
- Enum
Shape - Errors
- Problems found reading a document, with where each is.
- Field
- Found
- Where a reference was found.
- Id
- The id of content of kind
K: written@item:minecraft:stickor, in a field that can only be an item, justminecraft:stick(stick). - Located
- A problem and its place in the source.
- Ordered
- An object kept in file order, values of one schema.
- Problem
- A problem found reading a value.
- Read
- What reading a document gives: the value and the references in it.
- Reader
- The state of reading a value: where it is, the problems so far, and the references met (for the build to check against the content there is).
- Struct
Shape - TagId
- A tag of content of kind
K:@tag:item:minecraft:planks. - Variant
Enums§
- Color
- A color:
#RRGGBB,#AARRGGBB, or a.yrescolor. - Image
- An image: a source (
sprite:button,mymod:gui/logo,item:minecraft:stick) or a.yresimage. - OneOr
Tag - Content of kind
Kor a tag of it — a recipe ingredient. - Shape
- What a format looks like: drives Yog-IDLE’s property grids and pickers, completion, hover docs and the docs’ field tables.
- Text
- A text a player reads: Yog text as written, a
.yrestext, the name of some content (@item:minecraft:stickshows “Stick”), or any translation key (@lang:gui.done).
Traits§
- Kind
- A kind of content:
item,block, … — a mod declares its own withkind!. - Kinds
- One kind or several (
(Item, Block)): what a reference field takes. - Resolve
- What a tool makes of the references and texts it reads:
yog buildchecks each reference against the content there is and turns texts into translation keys; the IDE shows them. - Schema
- A Yog Data format.
Functions§
- field_
names - The field names of a struct’s shape (none for anything else).
- from_
doc - Reads a parsed document as
T;textis its source, for positions. - from_
doc_ with from_doc, references and texts going throughresolver.- from_
text - Parses
textand reads it asT; problems come with their line and column. - from_
value - Reads
vasT: the value and its references, or every problem. - from_
value_ with from_value, references and texts going throughresolver.- is_
metadata_ key - Source-only keys every object may have:
$…,_…,comment. - read_
both AandBread from the same object — each allowing the other’s fields, like serde’sflatten: a recipe’s common fields and its kind’s.- read_
ref vas a reference to content of one ofkinds(any kind if empty), written@kind:id— a bare id is an error that says how to write it.- to_text
valueas text, indented.