Skip to main content

default_matches_pattern

Function default_matches_pattern 

Source
pub fn default_matches_pattern(
    pattern: &str,
    value: &str,
    is_comma_delimited: bool,
) -> Option<bool>
Expand description

Whether every element of value matches pattern (auto-anchored). For a scalar parameter value is the whole default; for a CommaDelimitedList/List<> parameter it is the raw default and each comma-separated, trimmed element must match. Returns None when the pattern cannot be compiled at all - the caller reports that as an invalid pattern rather than a match failure.