Function select_first
Source pub fn select_first<'rule, T, M, R>(
_: &T,
rs: &mut dyn Iterator<Item = (&'rule R, Update<T, M>)>,
) -> Option<(&'rule R, Update<T, M>)>where
T: Uniplate,
R:
Rule<T, M>,
Expand description
Returns the first available (Rule, Update) if there is one, otherwise returns None.
This is a good default selection strategy, especially when you expect only one possible
rule to apply to any one term.
See the module-level documentation for more information.