Liking cljdoc? Tell your friends :D

representations.util.malli.registry


*cache-miss-hook*clj/s

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.
raw docstring

-with-docclj/s

(-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.
raw docstring

cachedclj/s

(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.
raw docstring

defclj/smacro

(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.
raw docstring

explainclj/s

(explain schema value)

[[mc/explain]], but uses a cached explainer from explainer.

[[mc/explain]], but uses a cached explainer from [[explainer]].
raw docstring

explainerclj/s

(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.
raw docstring

register!clj/s

(register! schema definition)

Register a spec with our Malli spec registry.

Register a spec with our Malli spec registry.
raw docstring

registryclj/s


validatorclj/s

(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.
raw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
Move to previous article
Move to next article
Ctrl+/Jump to the search field
× close