Struct rustc-serialize::json::Decoder [-] [+] [src]

pub struct Decoder {
    // some fields omitted
}

A structure to decode JSON to values in rust.

Methods

impl Decoder

fn new(json: Json) -> Decoder

Creates a new decoder instance for decoding the specified JSON value.

Trait Implementations

impl Decoder for Decoder

type Error = DecoderError

fn read_nil(&mut self) -> DecodeResult<()>

fn read_usize(&mut self) -> DecodeResult<usize>

fn read_u8(&mut self) -> DecodeResult<u8>

fn read_u16(&mut self) -> DecodeResult<u16>

fn read_u32(&mut self) -> DecodeResult<u32>

fn read_u64(&mut self) -> DecodeResult<u64>

fn read_isize(&mut self) -> DecodeResult<isize>

fn read_i8(&mut self) -> DecodeResult<i8>

fn read_i16(&mut self) -> DecodeResult<i16>

fn read_i32(&mut self) -> DecodeResult<i32>

fn read_i64(&mut self) -> DecodeResult<i64>

fn read_f32(&mut self) -> DecodeResult<f32>

fn read_f64(&mut self) -> DecodeResult<f64>

fn read_bool(&mut self) -> DecodeResult<bool>

fn read_char(&mut self) -> DecodeResult<char>

fn read_str(&mut self) -> DecodeResult<String>

fn read_enum<T, F>(&mut self, _name: &str, f: F) -> DecodeResult<T> where F: FnOnce(&mut Decoder) -> DecodeResult<T>

fn read_enum_variant<T, F>(&mut self, names: &[&str], f: F) -> DecodeResult<T> where F: FnMut(&mut Decoder, usize) -> DecodeResult<T>

fn read_enum_variant_arg<T, F>(&mut self, _idx: usize, f: F) -> DecodeResult<T> where F: FnOnce(&mut Decoder) -> DecodeResult<T>

fn read_enum_struct_variant<T, F>(&mut self, names: &[&str], f: F) -> DecodeResult<T> where F: FnMut(&mut Decoder, usize) -> DecodeResult<T>

fn read_enum_struct_variant_field<T, F>(&mut self, _name: &str, idx: usize, f: F) -> DecodeResult<T> where F: FnOnce(&mut Decoder) -> DecodeResult<T>

fn read_struct<T, F>(&mut self, _name: &str, _len: usize, f: F) -> DecodeResult<T> where F: FnOnce(&mut Decoder) -> DecodeResult<T>

fn read_struct_field<T, F>(&mut self, name: &str, _idx: usize, f: F) -> DecodeResult<T> where F: FnOnce(&mut Decoder) -> DecodeResult<T>

fn read_tuple<T, F>(&mut self, tuple_len: usize, f: F) -> DecodeResult<T> where F: FnOnce(&mut Decoder) -> DecodeResult<T>

fn read_tuple_arg<T, F>(&mut self, idx: usize, f: F) -> DecodeResult<T> where F: FnOnce(&mut Decoder) -> DecodeResult<T>

fn read_tuple_struct<T, F>(&mut self, _name: &str, len: usize, f: F) -> DecodeResult<T> where F: FnOnce(&mut Decoder) -> DecodeResult<T>

fn read_tuple_struct_arg<T, F>(&mut self, idx: usize, f: F) -> DecodeResult<T> where F: FnOnce(&mut Decoder) -> DecodeResult<T>

fn read_option<T, F>(&mut self, f: F) -> DecodeResult<T> where F: FnMut(&mut Decoder, bool) -> DecodeResult<T>

fn read_seq<T, F>(&mut self, f: F) -> DecodeResult<T> where F: FnOnce(&mut Decoder, usize) -> DecodeResult<T>

fn read_seq_elt<T, F>(&mut self, _idx: usize, f: F) -> DecodeResult<T> where F: FnOnce(&mut Decoder) -> DecodeResult<T>

fn read_map<T, F>(&mut self, f: F) -> DecodeResult<T> where F: FnOnce(&mut Decoder, usize) -> DecodeResult<T>

fn read_map_elt_key<T, F>(&mut self, _idx: usize, f: F) -> DecodeResult<T> where F: FnOnce(&mut Decoder) -> DecodeResult<T>

fn read_map_elt_val<T, F>(&mut self, _idx: usize, f: F) -> DecodeResult<T> where F: FnOnce(&mut Decoder) -> DecodeResult<T>

fn error(&mut self, err: &str) -> DecoderError