substrate-data-derive
#[derive(Schema)] for substrate-data.
Layer and context: shared kernel · data
- For: generating
Schemafor structs and enums: reading with paths, writing, binary and frame forms, the shape description, and#[data(...)]options (rename,default,skip,range,tag,view). - Not for: the model, the forms and the schema traits themselves; they live in
substrate-data, which re-exports the derive. Depend on that crate, not on this one.
Usage
use Schema;
let project: Project = from_text.unwrap.value;
assert_eq!;
The full list of attributes is in the crate documentation and docs/format.md.
Depends on / used by
- Depends on: no workspace crate (
substrate-datais a dev-dependency only, to test what the derive expands against) - Used by:
substrate-data
License
MIT OR Apache-2.0, see LICENSE-MIT and LICENSE-APACHE.