[][src]Struct gchemol_parser::TextParser

pub struct TextParser { /* fields omitted */ }
Deprecated:

To be removed for performance issue

A stream parser for large text file

Methods

impl TextParser[src]

pub fn new(n: usize) -> Self[src]

Construct a text parser with buffer size n

impl TextParser[src]

pub fn parse_file<R: AsRef<Path>, F, P>(
    &self,
    file: R,
    parser: F
) -> impl Iterator<Item = P> where
    F: Fn(&str) -> IResult<&str, P>, 
[src]

Entry point for parsing a text file

Parameters

  • parser: nom parser

Panics

  • panics if file doesnot exist.

pub fn parse<R: Read, F, P>(&self, r: R, parser: F) -> impl Iterator<Item = P> where
    F: Fn(&str) -> IResult<&str, P>, 
[src]

Entry point for parsing from text stream

Parameters

  • parser: nom parser

Trait Implementations

impl Default for TextParser[src]

General interface for parsing a large text file

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.