Struct 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<DecoderError> for Decoder

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

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

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

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

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

fn read_uint(&mut self) -> DecodeResult<uint>

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

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

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

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

fn read_int(&mut self) -> DecodeResult<int>

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

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

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

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

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

fn read_enum<T>(&mut self, name: &str, f: |&mut Decoder| -> DecodeResult<T>) -> DecodeResult<T>

fn read_enum_variant<T>(&mut self, names: &[&str], f: |&mut Decoder, uint| -> DecodeResult<T>) -> DecodeResult<T>

fn read_enum_variant_arg<T>(&mut self, idx: uint, f: |&mut Decoder| -> DecodeResult<T>) -> DecodeResult<T>

fn read_enum_struct_variant<T>(&mut self, names: &[&str], f: |&mut Decoder, uint| -> DecodeResult<T>) -> DecodeResult<T>

fn read_enum_struct_variant_field<T>(&mut self, name: &str, idx: uint, f: |&mut Decoder| -> DecodeResult<T>) -> DecodeResult<T>

fn read_struct<T>(&mut self, name: &str, len: uint, f: |&mut Decoder| -> DecodeResult<T>) -> DecodeResult<T>

fn read_struct_field<T>(&mut self, name: &str, idx: uint, f: |&mut Decoder| -> DecodeResult<T>) -> DecodeResult<T>

fn read_tuple<T>(&mut self, f: |&mut Decoder, uint| -> DecodeResult<T>) -> DecodeResult<T>

fn read_tuple_arg<T>(&mut self, idx: uint, f: |&mut Decoder| -> DecodeResult<T>) -> DecodeResult<T>

fn read_tuple_struct<T>(&mut self, name: &str, f: |&mut Decoder, uint| -> DecodeResult<T>) -> DecodeResult<T>

fn read_tuple_struct_arg<T>(&mut self, idx: uint, f: |&mut Decoder| -> DecodeResult<T>) -> DecodeResult<T>

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

fn read_seq<T>(&mut self, f: |&mut Decoder, uint| -> DecodeResult<T>) -> DecodeResult<T>

fn read_seq_elt<T>(&mut self, idx: uint, f: |&mut Decoder| -> DecodeResult<T>) -> DecodeResult<T>

fn read_map<T>(&mut self, f: |&mut Decoder, uint| -> DecodeResult<T>) -> DecodeResult<T>

fn read_map_elt_key<T>(&mut self, idx: uint, f: |&mut Decoder| -> DecodeResult<T>) -> DecodeResult<T>

fn read_map_elt_val<T>(&mut self, idx: uint, f: |&mut Decoder| -> DecodeResult<T>) -> DecodeResult<T>