pub struct Tape<'a> {
pub toks: Vec<Tok<'a>>,
}Fields§
§toks: Vec<Tok<'a>>Implementations§
Source§impl<'a> Tape<'a>
impl<'a> Tape<'a>
Sourcepub fn parse(
line: &'a [u8],
toks: Vec<Tok<'a>>,
) -> Result<Tape<'a>, (JsonError, Vec<Tok<'a>>)>
pub fn parse( line: &'a [u8], toks: Vec<Tok<'a>>, ) -> Result<Tape<'a>, (JsonError, Vec<Tok<'a>>)>
Parses one JSON document (the whole of line, trailing whitespace allowed).
pub fn skip(&self, i: usize) -> usize
Sourcepub fn members(&self, i: usize) -> impl Iterator<Item = (&'a [u8], usize)> + '_
pub fn members(&self, i: usize) -> impl Iterator<Item = (&'a [u8], usize)> + '_
The members of the object at i, as (key, value index).
pub fn get(&self, obj: usize, key: &str) -> Option<usize>
pub fn elems(&self, i: usize) -> impl Iterator<Item = usize> + '_
Sourcepub fn u64(&self, i: usize) -> Option<u64>
pub fn u64(&self, i: usize) -> Option<u64>
A non-negative integer that fits u64; anything else (sign, fraction, exponent,
overflow) is None.
pub fn bool(&self, i: usize) -> Option<bool>
pub fn str(&self, i: usize) -> Option<Cow<'a, str>>
Auto Trait Implementations§
impl<'a> Freeze for Tape<'a>
impl<'a> RefUnwindSafe for Tape<'a>
impl<'a> Send for Tape<'a>
impl<'a> Sync for Tape<'a>
impl<'a> Unpin for Tape<'a>
impl<'a> UnsafeUnpin for Tape<'a>
impl<'a> UnwindSafe for Tape<'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