atproto_codegen/lexicon
Lexicon model + JSON decoding: parse lexicon files into typed defs.
Supports record/object defs with string/integer/number/boolean/array/ref/
cid-link/bytes/blob/unknown/open-union fields. A def using anything else
(e.g. token, closed unions) becomes Unsupported and is reported, not
emitted wrong.
Types
pub type FieldType {
TString
TInt
TBool
TNumber
TRef(String)
TArray(FieldType)
TCidLink
TBytes
TBlob
TUnknown
TUnion(refs: List(String))
TUnsupported(String)
}
Constructors
-
TString -
TInt -
TBool -
TNumber -
TRef(String) -
TArray(FieldType) -
TCidLink -
TBytes -
TBlob -
TUnknown -
TUnion(refs: List(String)) -
TUnsupported(String)
Values
pub fn field_type_decoder() -> decode.Decoder(FieldType)
pub fn lexicon_decoder() -> decode.Decoder(Lexicon)