pub struct SliceLexer<'a> { /* private fields */ }Expand description
JSON lexer from a shared byte slice.
Implementations§
Trait Implementations§
Source§impl<'a> LexAlloc for SliceLexer<'a>
Available on crate feature alloc only.
impl<'a> LexAlloc for SliceLexer<'a>
Available on crate feature
alloc only.Source§impl<'a> LexWrite for SliceLexer<'a>
impl<'a> LexWrite for SliceLexer<'a>
Source§impl<'a> Read for SliceLexer<'a>
impl<'a> Read for SliceLexer<'a>
Auto Trait Implementations§
impl<'a> Freeze for SliceLexer<'a>
impl<'a> RefUnwindSafe for SliceLexer<'a>
impl<'a> Send for SliceLexer<'a>
impl<'a> Sync for SliceLexer<'a>
impl<'a> Unpin for SliceLexer<'a>
impl<'a> UnwindSafe for SliceLexer<'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
Source§impl<T> Lex for Twhere
T: Read,
impl<T> Lex for Twhere
T: Read,
Source§impl<T> Lex for Twhere
T: Read,
impl<T> Lex for Twhere
T: Read,
Source§fn digits_foreach(&mut self, f: impl FnMut(u8)) -> usize
fn digits_foreach(&mut self, f: impl FnMut(u8)) -> usize
Perform
f for every digit read and return the number of read bytes.Source§fn digits1_foreach(&mut self, f: impl FnMut(u8)) -> Result<NonZeroUsize, Error>
fn digits1_foreach(&mut self, f: impl FnMut(u8)) -> Result<NonZeroUsize, Error>
Run function for every digit, fail if no digit encountered.
Source§impl<T> Lex for Twhere
T: Read,
impl<T> Lex for Twhere
T: Read,
Source§fn eat_whitespace(&mut self)
fn eat_whitespace(&mut self)
Skip input until the earliest non-whitespace character.
Source§fn null_or_bool(&mut self) -> Option<Option<bool>>
fn null_or_bool(&mut self) -> Option<Option<bool>>
Parse a JSON token starting with a letter. Read more
Source§fn discarded(&mut self) -> &mut Self
fn discarded(&mut self) -> &mut Self
Take next character, discard it, and return mutable handle to lexer. Read more
Source§fn expect(
&mut self,
pf: impl FnOnce(&mut Self) -> Option<u8>,
expect: u8,
) -> Option<()>
fn expect( &mut self, pf: impl FnOnce(&mut Self) -> Option<u8>, expect: u8, ) -> Option<()>
Peek at next character, and discard it if it matches the expected character. Read more