pub struct Parser<'a> { /* private fields */ }Expand description
Parser for LNMP text format
Implementations§
Source§impl<'a> Parser<'a>
impl<'a> Parser<'a>
Sourcepub fn new(input: &'a str) -> Result<Self, LnmpError>
pub fn new(input: &'a str) -> Result<Self, LnmpError>
Creates a new parser for the given input (defaults to loose mode)
Sourcepub fn new_strict(input: &'a str) -> Result<Self, LnmpError>
pub fn new_strict(input: &'a str) -> Result<Self, LnmpError>
Creates a new parser using strict text input handling.
Sourcepub fn new_lenient(input: &'a str) -> Result<Self, LnmpError>
pub fn new_lenient(input: &'a str) -> Result<Self, LnmpError>
Creates a new parser using lenient text sanitization before parsing.
Sourcepub fn with_mode(input: &'a str, mode: ParsingMode) -> Result<Self, LnmpError>
pub fn with_mode(input: &'a str, mode: ParsingMode) -> Result<Self, LnmpError>
Creates a new parser with specified parsing mode
Sourcepub fn with_config(
input: &'a str,
config: ParserConfig,
) -> Result<Self, LnmpError>
pub fn with_config( input: &'a str, config: ParserConfig, ) -> Result<Self, LnmpError>
Creates a new parser with specified configuration
Sourcepub fn mode(&self) -> ParsingMode
pub fn mode(&self) -> ParsingMode
Returns the current parsing mode
Source§impl<'a> Parser<'a>
impl<'a> Parser<'a>
Sourcepub fn parse_record(&mut self) -> Result<LnmpRecord, LnmpError>
pub fn parse_record(&mut self) -> Result<LnmpRecord, LnmpError>
Parses a complete record
Auto Trait Implementations§
impl<'a> Freeze for Parser<'a>
impl<'a> RefUnwindSafe for Parser<'a>
impl<'a> Send for Parser<'a>
impl<'a> Sync for Parser<'a>
impl<'a> Unpin for Parser<'a>
impl<'a> UnwindSafe for Parser<'a>
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