pub struct Parser<R> {
pub read: R,
/* private fields */
}Fields§
§read: RImplementations§
Source§impl<'de, R> Parser<R>where
R: Reader<'de>,
impl<'de, R> Parser<R>where
R: Reader<'de>,
pub fn new(read: R) -> Self
pub fn offset(&self) -> usize
Sourcepub fn utf8_lossy(self) -> Self
pub fn utf8_lossy(self) -> Self
Enable lossy UTF-8 handling: invalid surrogates produce U+FFFD replacement chars instead of errors. Matches Go’s encoding/json behavior.
pub fn parse_number(&mut self, first: u8) -> Result<ParserNumber>
pub fn parse_str<'own>( &mut self, buf: &'own mut Vec<u8>, ) -> Result<Reference<'de, 'own, str>>
pub fn skip_space(&mut self) -> Option<u8>
pub fn skip_space_peek(&mut self) -> Option<u8>
pub fn parse_literal(&mut self, literal: &str) -> Result<()>
pub fn skip_number(&mut self, first: u8) -> Result<&'de str>
pub fn skip_one(&mut self, checked: bool) -> Result<(&'de [u8], ParseStatus)>
pub fn peek_invalid_type(&mut self, peek: u8, exp: &dyn Expected) -> Error
Auto Trait Implementations§
impl<R> Freeze for Parser<R>where
R: Freeze,
impl<R> RefUnwindSafe for Parser<R>where
R: RefUnwindSafe,
impl<R> Send for Parser<R>where
R: Send,
impl<R> Sync for Parser<R>where
R: Sync,
impl<R> Unpin for Parser<R>where
R: Unpin,
impl<R> UnsafeUnpin for Parser<R>where
R: UnsafeUnpin,
impl<R> UnwindSafe for Parser<R>where
R: UnwindSafe,
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