Struct rustc_serialize::json::Parser [-] [+] [src]

pub struct Parser<T> {
    // some fields omitted
}

A streaming JSON parser implemented as an iterator of JsonEvent, consuming an iterator of char.

Methods

impl<T: Iterator<Item=char>> Parser<T>

fn new(rdr: T) -> Parser<T>

Creates the JSON parser.

fn stack<'l>(&'l self) -> &'l Stack

Provides access to the current position in the logical structure of the JSON stream.

Trait Implementations

impl<T: Iterator<Item=char>> Iterator for Parser<T>

type Item = JsonEvent

fn next(&mut self) -> Option<JsonEvent>

fn size_hint(&self) -> (usize, Option<usize>)

fn count(self) -> usize

fn last(self) -> Option<<Self as Iterator>::Item>

fn nth(&mut self, n: usize) -> Option<<Self as Iterator>::Item>

fn chain<U>(self, other: U) -> Chain<Self, <U as IntoIterator>::IntoIter> where U: IntoIterator, <U as IntoIterator>::Item == <Self as Iterator>::Item

fn zip<U>(self, other: U) -> Zip<Self, <U as IntoIterator>::IntoIter> where U: IntoIterator

fn map<B, F>(self, f: F) -> Map<Self, F> where F: FnMut(<Self as Iterator>::Item), <F as FnOnce(<Self as Iterator>::Item)>::Output == B

fn filter<P>(self, predicate: P) -> Filter<Self, P> where P: FnMut(&<Self as Iterator>::Item), <P as FnOnce(&<Self as Iterator>::Item)>::Output == bool

fn filter_map<B, F>(self, f: F) -> FilterMap<Self, F> where F: FnMut(<Self as Iterator>::Item), <F as FnOnce(<Self as Iterator>::Item)>::Output == Option<B>

fn enumerate(self) -> Enumerate<Self>

fn peekable(self) -> Peekable<Self>

fn skip_while<P>(self, predicate: P) -> SkipWhile<Self, P> where P: FnMut(&<Self as Iterator>::Item), <P as FnOnce(&<Self as Iterator>::Item)>::Output == bool

fn take_while<P>(self, predicate: P) -> TakeWhile<Self, P> where P: FnMut(&<Self as Iterator>::Item), <P as FnOnce(&<Self as Iterator>::Item)>::Output == bool

fn skip(self, n: usize) -> Skip<Self>

fn take(self, n: usize) -> Take<Self>

fn scan<St, B, F>(self, initial_state: St, f: F) -> Scan<Self, St, F> where F: FnMut(&mut St, <Self as Iterator>::Item), <F as FnOnce(&mut St, <Self as Iterator>::Item)>::Output == Option<B>

fn flat_map<U, F>(self, f: F) -> FlatMap<Self, U, F> where U: IntoIterator, F: FnMut(<Self as Iterator>::Item), <F as FnOnce(<Self as Iterator>::Item)>::Output == U

fn fuse(self) -> Fuse<Self>

fn inspect<F>(self, f: F) -> Inspect<Self, F> where F: FnMut(&<Self as Iterator>::Item), <F as FnOnce(&<Self as Iterator>::Item)>::Output == ()

fn by_ref(&mut self) -> &mut Self

fn collect<B>(self) -> B where B: FromIterator<<Self as Iterator>::Item>

fn partition<B, F>(self, f: F) -> (B, B) where B: Default, B: Extend<<Self as Iterator>::Item>, F: FnMut(&<Self as Iterator>::Item), <F as FnOnce(&<Self as Iterator>::Item)>::Output == bool

fn fold<B, F>(self, init: B, f: F) -> B where F: FnMut(B, <Self as Iterator>::Item), <F as FnOnce(B, <Self as Iterator>::Item)>::Output == B

fn all<F>(&mut self, f: F) -> bool where F: FnMut(<Self as Iterator>::Item), <F as FnOnce(<Self as Iterator>::Item)>::Output == bool

fn any<F>(&mut self, f: F) -> bool where F: FnMut(<Self as Iterator>::Item), <F as FnOnce(<Self as Iterator>::Item)>::Output == bool

fn find<P>(&mut self, predicate: P) -> Option<<Self as Iterator>::Item> where P: FnMut(&<Self as Iterator>::Item), <P as FnOnce(&<Self as Iterator>::Item)>::Output == bool

fn position<P>(&mut self, predicate: P) -> Option<usize> where P: FnMut(<Self as Iterator>::Item), <P as FnOnce(<Self as Iterator>::Item)>::Output == bool

fn rposition<P>(&mut self, predicate: P) -> Option<usize> where P: FnMut(<Self as Iterator>::Item), <P as FnOnce(<Self as Iterator>::Item)>::Output == bool, Self: ExactSizeIterator, Self: DoubleEndedIterator

fn max(self) -> Option<<Self as Iterator>::Item> where <Self as Iterator>::Item: Ord

fn min(self) -> Option<<Self as Iterator>::Item> where <Self as Iterator>::Item: Ord

fn min_max(self) -> MinMaxResult<<Self as Iterator>::Item> where <Self as Iterator>::Item: Ord

fn max_by<B, F>(self, f: F) -> Option<<Self as Iterator>::Item> where B: Ord, F: FnMut(&<Self as Iterator>::Item), <F as FnOnce(&<Self as Iterator>::Item)>::Output == B

fn min_by<B, F>(self, f: F) -> Option<<Self as Iterator>::Item> where B: Ord, F: FnMut(&<Self as Iterator>::Item), <F as FnOnce(&<Self as Iterator>::Item)>::Output == B

fn rev(self) -> Rev<Self> where Self: DoubleEndedIterator

fn unzip<A, B, FromA, FromB>(self) -> (FromA, FromB) where FromA: Default, FromA: Extend<A>, FromB: Default, FromB: Extend<B>, Self: Iterator, <Self as Iterator>::Item == (A, B)

fn cloned<'a, T>(self) -> Cloned<Self> where T: 'a, Self: Iterator, <Self as Iterator>::Item == &'a T, T: Clone

fn cycle(self) -> Cycle<Self> where Self: Clone

fn reverse_in_place<'a, T>(&mut self) where T: 'a, Self: Iterator, <Self as Iterator>::Item == &'a mut T, Self: DoubleEndedIterator

fn sum<S = <Self as Iterator>::Item>(self) -> S where S: Add<<Self as Iterator>::Item>, <S as Add<<Self as Iterator>::Item>>::Output == S, S: Zero

fn product<P = <Self as Iterator>::Item>(self) -> P where P: Mul<<Self as Iterator>::Item>, <P as Mul<<Self as Iterator>::Item>>::Output == P, P: One