Trait gaffe_xilinx::from_bytes::BufReadFromBytesExt[][src]

pub trait BufReadFromBytesExt: BufRead {
    fn skip_until_match(&mut self, pattern: &[u8]) -> Result<bool, Error> { ... }
}

Extension to std::io::BufRead providing convenience methods for operations commonly used when reading binary formats.

Provided Methods

Consume bytes from this reader until pattern has been consumed.

If pattern is found, true is returned and the reader has been advanced to the byte immediately following the last byte of pattern. Otherwise, returns false and the reader is at EOF.

Errors

This function will ignore all instances of ErrorKind::Interrupted and will otherwise return any errors returned by BufRead::fill_buf.

Implementors