(defstruct name fields)This macro works similarly to clojure.core/defrecord, except borsh schema will be defined at the same time. Generated class and constructor function(e.g. ->Foo) are extended to protocol HasSchema, so both (schema Foo) and (schema ->Foo) return the schema.
This macro works similarly to clojure.core/defrecord, except borsh schema will be defined at the same time. Generated class and constructor function(e.g. ->Foo) are extended to protocol HasSchema, so both (schema Foo) and (schema ->Foo) return the schema.
(defstruct-impl env name fields)(defvariants name variants)This macro creates a schema of variants to represent the complex enums.
This macro creates a schema of variants to represent the complex enums.
(defvariants-impl name variants)(parse-field f)(parse-field-schema s)(parse-schema fields)Return schema based on fields' metadata.
Return schema based on fields' metadata.
(sym->ctor sym)(unify-meta m)cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |