use nom::IResult;

pub trait StreamProducer {
  fn parse<F, T>(&mut self, f: F) -> Result<T, ErrorKind>
   where F: FnOnce(&[u8]) -> IResult<&[u8], T>;
}

Add a simple trait for single time parsing
Add a simple trait for single time parsing

This is inspired by the chomp project <https://github.com/m4rw3r/chomp>.
