pub struct JSONParser<'a> { /* private fields */ }Expand description
Port of JSONParser (JSONParser.h:630). Drives JSLexer; errors go through
the lexer’s single &mut SourceErrorManager.
Implementations§
Source§impl<'a> JSONParser<'a>
impl<'a> JSONParser<'a>
Sourcepub fn new(
factory: &'a JSONFactory<'a>,
buf_id: SourceId,
sm: &'a mut SourceErrorManager,
atoms: &'a AtomTable,
convert_surrogates: bool,
) -> JSONParser<'a>
pub fn new( factory: &'a JSONFactory<'a>, buf_id: SourceId, sm: &'a mut SourceErrorManager, atoms: &'a AtomTable, convert_surrogates: bool, ) -> JSONParser<'a>
Construct a JSONParser over the source buffer identified by buf_id in
sm. Port of JSONParser::JSONParser (JSONParser.h:666-678).
Sourcepub fn error_count(&self) -> u32
pub fn error_count(&self) -> u32
Returns the number of errors reported so far (via the shared
SourceErrorManager).
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for JSONParser<'a>
impl<'a> !Send for JSONParser<'a>
impl<'a> !Sync for JSONParser<'a>
impl<'a> !UnwindSafe for JSONParser<'a>
impl<'a> Freeze for JSONParser<'a>
impl<'a> Unpin for JSONParser<'a>
impl<'a> UnsafeUnpin for JSONParser<'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