atproto_sdl/printer
Print an atproto_lexicon/ast.LexiconDoc back to Lexicon SDL text.
Depends only on atproto_lexicon/ast and stdlib (via printer/*):
it must be usable without the parser existing at all. print is
total, no error channel: a def keyed "main" prints under the
NSID’s last segment plus an explicit @main (robust regardless of
name collisions); a DefString with known_values/enum populated
prints as enum, otherwise as type Name = String ....
This module owns document structure and per-def-kind dispatch;
printer/types owns field/property/item/param rendering;
printer/methods owns xrpc method shapes; printer/constraints
owns constraint-record rendering; printer/render owns generic
string/attribute formatting.
Values
pub fn print(doc: ast.LexiconDoc) -> String