A hook that is called whenever there is a cache miss, for side effects. This is used in tests or to monitor cache misses.
A hook that is called whenever there is a cache miss, for side effects. This is used in tests or to monitor cache misses.
(-with-doc schema docstring)Add a :description option to a schema. Tries to merge it in existing vector schemas to avoid unnecessary
indirection.
Add a `:description` option to a `schema`. Tries to merge it in existing vector schemas to avoid unnecessary indirection.
(cached k schema value-thunk)Get a cached value for k + schema. Cache is cleared whenever a schema is (re)defined
with [representations.util.malli.registry/def]]. If value doesn't exist, value-thunk is used to calculate (and cache)
it.
You generally shouldn't use this outside of this namespace unless you have a really good reason to do so! Make sure you used namespaced keys if you are using it elsewhere.
Get a cached value for `k` + `schema`. Cache is cleared whenever a schema is (re)defined with [representations.util.malli.registry/def]]. If value doesn't exist, `value-thunk` is used to calculate (and cache) it. You generally shouldn't use this outside of this namespace unless you have a really good reason to do so! Make sure you used namespaced keys if you are using it elsewhere.
(def type schema)(def type docstring schema)Like [[clojure.spec.alpha/def]]; add a Malli schema to our registry.
Like [[clojure.spec.alpha/def]]; add a Malli schema to our registry.
(explain schema value)[[mc/explain]], but uses a cached explainer from explainer.
[[mc/explain]], but uses a cached explainer from [[explainer]].
(explainer schema)Fetch a cached [[mc/explainer]] for schema, creating one if needed. The cache is flushed whenever the registry
changes.
Fetch a cached [[mc/explainer]] for `schema`, creating one if needed. The cache is flushed whenever the registry changes.
(register! schema definition)Register a spec with our Malli spec registry.
Register a spec with our Malli spec registry.
(validator schema)Fetch a cached [[mc/validator]] for schema, creating one if needed. The cache is flushed whenever the registry
changes.
Fetch a cached [[mc/validator]] for `schema`, creating one if needed. The cache is flushed whenever the registry changes.
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 |