Return `true` when `line` passes the filter and is worth parsing.
(&self, line: &[u8])
| 57 | |
| 58 | /// Return `true` when `line` passes the filter and is worth parsing. |
| 59 | pub(crate) fn matches(&self, line: &[u8]) -> bool { |
| 60 | match self.mode { |
| 61 | PrefilterMode::All => self |
| 62 | .finders |
| 63 | .iter() |
| 64 | .all(|finder| finder.find(line).is_some()), |
| 65 | PrefilterMode::Any => self |
| 66 | .finders |
| 67 | .iter() |
| 68 | .any(|finder| finder.find(line).is_some()), |
| 69 | } |
| 70 | } |
| 71 | } |
| 72 | |
| 73 | pub(crate) struct ByteLines<'a> { |