pub struct JsonPullParser<'a> { /* private fields */ }Expand description
Zero-allocation streaming JSON pull parser.
Tracks up to 16 levels of nesting on the stack without any heap allocation.
Implementations§
Source§impl<'a> JsonPullParser<'a>
impl<'a> JsonPullParser<'a>
Sourcepub fn new(input: &'a str) -> Self
pub fn new(input: &'a str) -> Self
Creates a new streaming pull parser over a borrowed JSON string.
Sourcepub fn next_event(&mut self) -> Result<Option<JsonPullEvent<'a>>, ErrorCode>
pub fn next_event(&mut self) -> Result<Option<JsonPullEvent<'a>>, ErrorCode>
Advances the parser and returns the next JsonPullEvent.
Returns Ok(None) when EOF is reached.
Auto Trait Implementations§
impl<'a> Freeze for JsonPullParser<'a>
impl<'a> RefUnwindSafe for JsonPullParser<'a>
impl<'a> Send for JsonPullParser<'a>
impl<'a> Sync for JsonPullParser<'a>
impl<'a> Unpin for JsonPullParser<'a>
impl<'a> UnsafeUnpin for JsonPullParser<'a>
impl<'a> UnwindSafe for JsonPullParser<'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