stch.schema.util documentation
Private utilities used in schema implementation.
->ErrorContainer
(->ErrorContainer error)
Positional factory function for class stch.schema.util.ErrorContainer.
->NamedError
(->NamedError name error)
For cljs sake (easier than normalizing imports in macros.clj).
->SimpleVCell
(->SimpleVCell q)
Positional factory function for class stch.schema.util.SimpleVCell.
->ValidationError
(->ValidationError schema value expectation-delay fail-explanation)
For cljs sake (easier than normalizing imports in macros.clj).
assoc-when
(assoc-when m & kvs)
Like assoc but only assocs when value is truthy.
Copied from plumbing.core so that schema need not
depend on plumbing.
class-schema
(class-schema klass)
declare-class-schema!
(declare-class-schema! klass schema)
error
(error x)
Distinguish a value (must be non-nil) as an error.
map->ErrorContainer
(map->ErrorContainer m__5818__auto__)
Factory function for class stch.schema.util.ErrorContainer, taking a map of keywords to field values.
named-error-explain
(named-error-explain err)
result-builder
(result-builder lift-to-error)
Build up a result by conjing values, producing an error
if at least one sub-value returns an error.
use-fn-validation
Turn on run-time function validation for functions compiled when
*compile-function-validation* was true -- has no effect for
functions compiled when it is false.
validation-error-explain
(validation-error-explain err)
value-name
(value-name value)
Provide a descriptive short name for a value.
wrap-error-name
(wrap-error-name name maybe-error)
If maybe-error is an error, wrap the inner value in a NamedError;
otherwise, return as-is.