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.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Parser
impl RefUnwindSafe for Parser
impl Send for Parser
impl Sync for Parser
impl Unpin for Parser
impl UnwindSafe for Parser
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more