[−][src]Crate gchemol_parser
Text Reader for large text file.
Example
use gchemol_parser::TextReader; let mut reader = TextReader::from_path("./tests/files/ch3f.mol2").unwrap(); // read a line into `s` let mut s = String::new(); reader.read_line(&mut s).unwrap(); // seek a specific line let _ = reader.seek_line(|line| line.starts_with("@<TRIPOS>")).unwrap(); // split remaining text into chunks (each chunk has 5 lines) let chunks = reader.chunks(5); for x in chunks { // call nom parser to parse each chunk dbg!(x); }
Modules
parsers | Selected nom parser combinators (complete version, no streaming) |
partition | Split large text stream into multiple parts. |
Structs
Bunches | Deprecated |
Chunks | Deprecated An iterator over a chunk of text in |
Partitions | Deprecated An iterator over partitioned lines of an instance of BufRead. |
Preceded | Deprecated Preceded with |
ReadContext | Deprecated A helper struct for handling buffered text. |
Terminated | Deprecated Terminated with |
TextParser | Deprecated A stream parser for large text file |
TextReader | A stream reader for large text file |
Traits
Partition | Deprecated Read next line or not |