Skip to main content

Predicate

Type Alias Predicate 

Source
pub type Predicate<C> = Box<dyn Fn(&C) -> Option<RejectionReason>>;
Expand description

A predicate over a candidate: returns None if it passes, Some(reason) if rejected (and why). Because every predicate returns its reason, a SelectionReport trace falls out of filter / select for free.

Aliased Typeยง

pub struct Predicate<C>(/* private fields */);