pub enum FilterKind {
Opaque,
Range {
bounds: Box<dyn Fn(&[&dyn Any]) -> Option<(Box<dyn Any>, Box<dyn Any>)>>,
},
}Expand description
What shape of validation/derivation a Filter performs, beyond its opaque function — set by
adam-lang’s compile phase when a filter’s expression matches a recognized structural form.
Opaque carries no extra information; consumers that don’t care about structure treat every
kind identically at write/propagate time — FilterKind is purely informational, queried by
consumers like begin’s UI that want to render a specialized editor without inspecting the
filter’s function.
Variants§
Opaque
The filter’s expression wasn’t a recognized structural form.
Range
Compiled from a RangeInclusive<T>-typed expression (lo..=hi). bounds re-evaluates
that expression against the filter’s current argument values, returning the resulting
(lo, hi) as type-erased values of the filtered cell’s own type T, or None if the
underlying expression fails to evaluate (e.g. a fallible arithmetic op in a range
endpoint, such as a checked_* operation overflowing).
The bound evaluator satisfies Filter’s purity and invocation contract.
Fields
bounds: Box<dyn Fn(&[&dyn Any]) -> Option<(Box<dyn Any>, Box<dyn Any>)>>Re-evaluates the range expression, returning (lo, hi) as type-erased values, or
None if evaluation fails.
Adam-compiled evaluators also return None for missing or extra arguments,
incorrect scalar identities, or mismatched compound carriers or shapes.
They validate every argument before binding raw addresses or evaluating,
including on calls following a successful evaluation or rejection.