The sums this store closes over.
defadt states a sum ONCE and derives the rest: the constructor (which
refuses a variant the sum does not declare), the predicate, the keyword
coercion, and the ADT's own malli schema. adt-case then checks coverage at
macro-expansion time, so a new variant breaks compilation at every site that
must decide about it — which is the entire reason for naming the sum instead
of passing loose keywords around.
Values stay plain data — {:adt/type T :adt/variant v} — so they survive a
trip through JSON, a database column or a test fixture unchanged.
The sums this store closes over.
`defadt` states a sum ONCE and derives the rest: the constructor (which
refuses a variant the sum does not declare), the predicate, the keyword
coercion, and the ADT's own malli schema. `adt-case` then checks coverage at
macro-expansion time, so a new variant breaks compilation at every site that
must decide about it — which is the entire reason for naming the sum instead
of passing loose keywords around.
Values stay plain data — `{:adt/type T :adt/variant v}` — so they survive a
trip through JSON, a database column or a test fixture unchanged.(->checkout-state kw__1685__auto__)Coerce a keyword to a CheckoutState variant (no data fields). Returns nil if keyword is not a valid variant.
Coerce a keyword to a CheckoutState variant (no data fields). Returns nil if keyword is not a valid variant.
(->reachability kw__1685__auto__)Coerce a keyword to a Reachability variant (no data fields). Returns nil if keyword is not a valid variant.
Coerce a keyword to a Reachability variant (no data fields). Returns nil if keyword is not a valid variant.
(->settlement-outcome kw__1685__auto__)Coerce a keyword to a SettlementOutcome variant (no data fields). Returns nil if keyword is not a valid variant.
Coerce a keyword to a SettlementOutcome variant (no data fields). Returns nil if keyword is not a valid variant.
(adt-case type-ref expr & clauses)hive-dsl.adt/adt-case, re-exported so a namespace that decides about one of
these sums requires the sums and nothing else.
`hive-dsl.adt/adt-case`, re-exported so a namespace that decides about one of these sums requires the sums and nothing else.
(checkout-state variant-kw__1682__auto__)(checkout-state variant-kw__1682__auto__ data__1683__auto__)Construct a CheckoutState variant. (checkout-state variant-keyword) for enum variants (checkout-state variant-keyword data-map) for data variants
Throws ex-info for unknown variants.
Construct a CheckoutState variant. (checkout-state variant-keyword) for enum variants (checkout-state variant-keyword data-map) for data variants Throws ex-info for unknown variants.
(checkout-state? x__1684__auto__)True if x is a CheckoutState ADT value.
True if x is a CheckoutState ADT value.
What a hosted checkout currently is, as its processor reports it.
What a hosted checkout currently is, as its processor reports it.
Malli :multi schema (dispatch :adt/variant) for CheckoutState — generator-capable and EDN-safe wherever pred-sym->malli covers the declared field predicates.
Malli :multi schema (dispatch :adt/variant) for CheckoutState — generator-capable and EDN-safe wherever pred-sym->malli covers the declared field predicates.
(reachability variant-kw__1682__auto__)(reachability variant-kw__1682__auto__ data__1683__auto__)Construct a Reachability variant. (reachability variant-keyword) for enum variants (reachability variant-keyword data-map) for data variants
Throws ex-info for unknown variants.
Construct a Reachability variant. (reachability variant-keyword) for enum variants (reachability variant-keyword data-map) for data variants Throws ex-info for unknown variants.
Whether a service the store depends on can be reached, and if not, how it failed. The distinction is the whole point: a refusal is a service that is down, a timeout is a path that is blocked.
Whether a service the store depends on can be reached, and if not, how it failed. The distinction is the whole point: a refusal is a service that is down, a timeout is a path that is blocked.
(reachability? x__1684__auto__)True if x is a Reachability ADT value.
True if x is a Reachability ADT value.
Malli :multi schema (dispatch :adt/variant) for Reachability — generator-capable and EDN-safe wherever pred-sym->malli covers the declared field predicates.
Malli :multi schema (dispatch :adt/variant) for Reachability — generator-capable and EDN-safe wherever pred-sym->malli covers the declared field predicates.
(settlement-outcome variant-kw__1682__auto__)(settlement-outcome variant-kw__1682__auto__ data__1683__auto__)Construct a SettlementOutcome variant. (settlement-outcome variant-keyword) for enum variants (settlement-outcome variant-keyword data-map) for data variants
Throws ex-info for unknown variants.
Construct a SettlementOutcome variant. (settlement-outcome variant-keyword) for enum variants (settlement-outcome variant-keyword data-map) for data variants Throws ex-info for unknown variants.
(settlement-outcome? x__1684__auto__)True if x is a SettlementOutcome ADT value.
True if x is a SettlementOutcome ADT value.
What an observed movement of money means for the invoice behind it.
What an observed movement of money means for the invoice behind it.
Malli :multi schema (dispatch :adt/variant) for SettlementOutcome — generator-capable and EDN-safe wherever pred-sym->malli covers the declared field predicates.
Malli :multi schema (dispatch :adt/variant) for SettlementOutcome — generator-capable and EDN-safe wherever pred-sym->malli covers the declared field predicates.
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 |