MCPcopy Create free account
hub / github.com/csskit/csskit / is_valid

Method is_valid

crates/csskit_ast/src/when_rule.rs:49–56  ·  view source on GitHub ↗

Check if all features in this condition have valid threshold values.

(&self, source: &str)

Source from the content-addressed store, hash-verified

47
48 /// Check if all features in this condition have valid threshold values.
49 pub fn is_valid(&self, source: &str) -> bool {
50 match self {
51 Self::Is(feature) => feature.is_valid(source),
52 Self::Not(_, feature) => feature.is_valid(source),
53 Self::And(features) => features.iter().all(|(f, _)| f.is_valid(source)),
54 Self::Or(features) => features.iter().all(|(f, _)| f.is_valid(source)),
55 }
56 }
57}
58
59impl<'a> FeatureConditionList<'a> for WhenCondition<'a> {

Callers 2

process_nested_rulesMethod · 0.80
newMethod · 0.80

Calls 2

iterMethod · 0.80
str_sliceMethod · 0.80

Tested by

no test coverage detected