pub struct Parser<'t> { /* private fields */ }Expand description
Parser for processing text with a compiled template.
Implementations§
Source§impl<'t> Parser<'t>
impl<'t> Parser<'t>
Sourcepub fn parse_text(&mut self, text: &str) -> Result<Vec<Vec<Value>>, ParseError>
pub fn parse_text(&mut self, text: &str) -> Result<Vec<Vec<Value>>, ParseError>
Parse text and return list of records.
Sourcepub fn parse_text_with_eof(
&mut self,
text: &str,
eof: bool,
) -> Result<Vec<Vec<Value>>, ParseError>
pub fn parse_text_with_eof( &mut self, text: &str, eof: bool, ) -> Result<Vec<Vec<Value>>, ParseError>
Parse text with explicit EOF control.
Sourcepub fn parse_text_to_dicts(
&mut self,
text: &str,
) -> Result<Vec<HashMap<String, String>>, ParseError>
pub fn parse_text_to_dicts( &mut self, text: &str, ) -> Result<Vec<HashMap<String, String>>, ParseError>
Parse text and return results as list of dicts.
Auto Trait Implementations§
impl<'t> Freeze for Parser<'t>
impl<'t> RefUnwindSafe for Parser<'t>
impl<'t> Send for Parser<'t>
impl<'t> Sync for Parser<'t>
impl<'t> Unpin for Parser<'t>
impl<'t> UnwindSafe for Parser<'t>
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