Skip to main content

is_valid

Function is_valid 

Source
pub fn is_valid<'a>(
    restrictions: &'a [&'a str],
) -> impl Fn(&SpellAbility) -> bool + 'a
Expand description

Returns a predicate that checks if a spell ability matches all given restriction strings. Each restriction is checked against the ability’s params. Mirrors Java’s SpellAbilityPredicates.isValid(String[]).