Struct pobsd_parser::parser::Parser
source · pub struct Parser { /* private fields */ }
Expand description
Parser provides a parser that can be created using the Parser::new
method
which takes a ParsingMode
enum as only argument.
Implementations§
source§impl Parser
impl Parser
sourcepub fn new(mode: ParsingMode) -> Self
pub fn new(mode: ParsingMode) -> Self
Crate a parser with a given parsing mode
sourcepub fn load_from_file(
self,
file: impl AsRef<Path>
) -> Result<ParserResult, Error>
pub fn load_from_file( self, file: impl AsRef<Path> ) -> Result<ParserResult, Error>
Load the database from a file.
sourcepub fn load_from_string(self, data: &str) -> ParserResult
pub fn load_from_string(self, data: &str) -> ParserResult
Load the database from a string.