Expand description
The lexicon documents this project defines, embedded in the binary.
The JSON under lexicons/ is the source of truth for the record shapes
this project defines and for the bot.did.* XRPC methods its server
answers. It is compiled in with include_str! rather than read from disk so that a
deployed binary cannot disagree with the schemas it was built from, and so
that the consistency checks below run as ordinary unit tests.
This module deliberately does not validate records or responses. It
validates that the schema documents themselves are well formed and that
their identifiers agree with their paths and with crate::nsid. Record
validation belongs with the repository layer, against a real lexicon
resolver; a route’s answer is checked against its document by
crates/didbot/tests/conformance/bot_did.rs.
Structs§
- Embedded
- One embedded lexicon: the path it came from and its raw JSON text.
- Lexicon
Doc - A lexicon document as published under
lexicons/.
Enums§
- Lexicon
Error - Failure to load one of the embedded lexicon documents.
Constants§
- EMBEDDED
- Every lexicon document this project defines.
Functions§
- load_
all - Parses every embedded document.