Module hoard::combinator
source · Expand description
A Combinator
provides a newtype to parse a two-dimensional list of items as a collection of
AND-ed and OR-ed elements. Every item in the outer list is OR-ed, while every item in an inner list
is AND-ed. That is, for
ⓘ
[ foo, bar, [baz, quux]]
The list will be parsed as foo OR bar OR (baz AND quux)
.
All AND/OR combinations must be expressed in this fashion. For example, to get foo AND bar
,
you want [[foo, bar]]
.
It also implements serde::Serialize
and serde::Deserialize
for innermost types that implement
Into<bool>
and the appropriate serde impl. No optimizations are applied to make later
evaluations easier.
Structs
- A combination of things that can evaluate to
true
orfalse
.
Enums
- An internal container for the
Combinator<T>
type.