Struct chisel_json::parsers::sax::Parser
source · pub struct Parser { /* private fields */ }
Expand description
Main JSON parser struct
Implementations§
source§impl Parser
impl Parser
sourcepub fn with_encoding(encoding: Encoding) -> Self
pub fn with_encoding(encoding: Encoding) -> Self
Create a new instance of the parser using a specific Encoding
pub fn parse_file<PathLike: AsRef<Path>, Callback>( &self, path: PathLike, cb: &mut Callback ) -> ParserResult<()>where Callback: FnMut(&Event<'_>) -> ParserResult<()>,
pub fn parse_bytes<Callback>( &self, bytes: &[u8], cb: &mut Callback ) -> ParserResult<()>where Callback: FnMut(&Event<'_>) -> ParserResult<()>,
pub fn parse_str<Callback>( &self, str: &str, cb: &mut Callback ) -> ParserResult<()>where Callback: FnMut(&Event<'_>) -> ParserResult<()>,
sourcepub fn parse_buffer<Callback>(
&self,
buffer: &mut impl BufRead,
cb: &mut Callback
) -> ParserResult<()>where
Callback: FnMut(&Event<'_>) -> ParserResult<()>,
pub fn parse_buffer<Callback>( &self, buffer: &mut impl BufRead, cb: &mut Callback ) -> ParserResult<()>where Callback: FnMut(&Event<'_>) -> ParserResult<()>,
Parse the contents extracted from an instance of BufRead
pub fn parse<Callback>( &self, chars: &mut impl Iterator<Item = char>, cb: &mut Callback ) -> ParserResult<()>where Callback: FnMut(&Event<'_>) -> ParserResult<()>,
Trait Implementations§
Auto Trait Implementations§
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