scan

Function scan 

Source
pub fn scan(reader: impl Read, pattern: &str) -> Result<Vec<usize>, Error>
Expand description

Scan for any instances of pattern in the bytes read by reader.

Returns a Result containing a vector of indices of the start of each match within the bytes. If no matches are found, this vector will be empty. Returns an Error if an error was encountered while scanning, which could occur if the pattern is invalid (i.e: contains something other than 8-bit hex values and wildcards), or if the reader encounters an error.