pub struct Parser { /* private fields */ }
Expand description
Parser
parses the PlayOnBSD database provided as a &str
or from
a file and returns a ParserResult
holding a vector of Game
contained
in the PlayOnBSD database.
Implementations§
source§impl Parser
impl Parser
sourcepub fn new(mode: ParsingMode) -> Self
pub fn new(mode: ParsingMode) -> Self
Crate a Parser
set to the 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