Function cargo_culture_kit::checklist::filter_to_requested_rules_by_description[][src]

pub fn filter_to_requested_rules_by_description<'r, 'd>(
    available_rules: &'r [&Rule],
    desired_rule_descriptions: &'d [&str]
) -> Result<Vec<&'r Rule>, FilterError>

Produces a filtered subset of the provided Rules by matching their descriptions to the members of the the desired_rule_descriptions slice.

Errors

Returns a FilterError::RuleChecklistReadError error when one of the lines of the file does not match any of the provided Rule descriptions.