Skip to main content

FilterKind

Enum FilterKind 

Source
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.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.