Skip to main content

Module manifest_schema

Module manifest_schema 

Source
Expand description

#2096: the JSON Schema types for the bynk.toml tables this crate checks.

[project], [paths], [workers], [unstable] and the packaging tables are read by hand, from a toml::Table, against MANIFEST_TABLES and MANIFEST_MAP_TABLES, so there is no serde struct to derive a schema from. These types describe them for an editor instead: each field’s doc comment is the description a TOML extension shows on hover. [lsp] is here too, because its reader lives in bynk-lsp, which nothing that assembles the schema can depend on; bynk-lsp’s own test holds its LspSection to this one. [fmt] is not here: bynk-fmt derives it from the struct that reads it (bynk_fmt::fmt_table_schema).

cargo xtask manifest-schema assembles the whole schema, and its test fails when a table or key here disagrees with MANIFEST_TABLES or the committed schema is stale. Only built with the schema feature.

Functions§

table_schema
The schema of the bynk.toml table name, or None for a table this crate doesn’t describe (fmt, which is bynk-fmt’s, or an unknown name).