Evaluate this predicate against the given haystack
(&self, haystack: &[u8])
| 35 | |
| 36 | /// Evaluate this predicate against the given haystack |
| 37 | pub fn evaluate(&self, haystack: &[u8]) -> bool { |
| 38 | match self { |
| 39 | Self::Contains(finder) => finder.find(haystack).is_some(), |
| 40 | Self::StartsWith(v) => starts_with(haystack, v, equals_kernel), |
| 41 | Self::EndsWith(v) => ends_with(haystack, v, equals_kernel), |
| 42 | } |
| 43 | } |
| 44 | |
| 45 | /// Evaluate this predicate against the elements of `array` |
| 46 | /// |
nothing calls this directly
no test coverage detected