[−][src]Struct rustc_serialize::json::Decoder
A structure to decode JSON to values in rust.
Methods
impl Decoder
[src]
impl Decoder
pub fn new(json: Json) -> Decoder
[src]
pub fn new(json: Json) -> Decoder
Creates a new decoder instance for decoding the specified JSON value.
Trait Implementations
impl Decoder for Decoder
[src]
impl Decoder for Decoder
type Error = DecoderError
The error type for method results.
fn read_nil(&mut self) -> DecodeResult<()>
[src]
fn read_nil(&mut self) -> DecodeResult<()>
Read a nil value.
fn read_usize(&mut self) -> DecodeResult<usize>
[src]
fn read_usize(&mut self) -> DecodeResult<usize>
Read a usize value.
fn read_u8(&mut self) -> DecodeResult<u8>
[src]
fn read_u8(&mut self) -> DecodeResult<u8>
Read a u8 value.
fn read_u16(&mut self) -> DecodeResult<u16>
[src]
fn read_u16(&mut self) -> DecodeResult<u16>
Read a u16 value.
fn read_u32(&mut self) -> DecodeResult<u32>
[src]
fn read_u32(&mut self) -> DecodeResult<u32>
Read a u32 value.
fn read_u64(&mut self) -> DecodeResult<u64>
[src]
fn read_u64(&mut self) -> DecodeResult<u64>
Read a u64 value.
fn read_isize(&mut self) -> DecodeResult<isize>
[src]
fn read_isize(&mut self) -> DecodeResult<isize>
Read a isize value.
fn read_i8(&mut self) -> DecodeResult<i8>
[src]
fn read_i8(&mut self) -> DecodeResult<i8>
Read a i8 value.
fn read_i16(&mut self) -> DecodeResult<i16>
[src]
fn read_i16(&mut self) -> DecodeResult<i16>
Read a i16 value.
fn read_i32(&mut self) -> DecodeResult<i32>
[src]
fn read_i32(&mut self) -> DecodeResult<i32>
Read a i32 value.
fn read_i64(&mut self) -> DecodeResult<i64>
[src]
fn read_i64(&mut self) -> DecodeResult<i64>
Read a i64 value.
fn read_f32(&mut self) -> DecodeResult<f32>
[src]
fn read_f32(&mut self) -> DecodeResult<f32>
Read a f32 value.
fn read_f64(&mut self) -> DecodeResult<f64>
[src]
fn read_f64(&mut self) -> DecodeResult<f64>
Read a f64 value.
fn read_bool(&mut self) -> DecodeResult<bool>
[src]
fn read_bool(&mut self) -> DecodeResult<bool>
Read a bool value.
fn read_char(&mut self) -> DecodeResult<char>
[src]
fn read_char(&mut self) -> DecodeResult<char>
Read a char value.
fn read_str(&mut self) -> DecodeResult<String>
[src]
fn read_str(&mut self) -> DecodeResult<String>
Read a string value.
fn read_enum<T, F>(&mut self, _name: &str, f: F) -> DecodeResult<T> where
F: FnOnce(&mut Decoder) -> DecodeResult<T>,
[src]
fn read_enum<T, F>(&mut self, _name: &str, f: F) -> DecodeResult<T> where
F: FnOnce(&mut Decoder) -> DecodeResult<T>,
Read an enumeration value. Read more
fn read_enum_variant<T, F>(&mut self, names: &[&str], f: F) -> DecodeResult<T> where
F: FnMut(&mut Decoder, usize) -> DecodeResult<T>,
[src]
fn read_enum_variant<T, F>(&mut self, names: &[&str], f: F) -> DecodeResult<T> where
F: FnMut(&mut Decoder, usize) -> DecodeResult<T>,
Read an enumeration value. Read more
fn read_enum_variant_arg<T, F>(&mut self, _idx: usize, f: F) -> DecodeResult<T> where
F: FnOnce(&mut Decoder) -> DecodeResult<T>,
[src]
fn read_enum_variant_arg<T, F>(&mut self, _idx: usize, f: F) -> DecodeResult<T> where
F: FnOnce(&mut Decoder) -> DecodeResult<T>,
Read an unnamed data item for an enumeration variant. Read more
fn read_enum_struct_variant<T, F>(
&mut self,
names: &[&str],
f: F
) -> DecodeResult<T> where
F: FnMut(&mut Decoder, usize) -> DecodeResult<T>,
[src]
fn read_enum_struct_variant<T, F>(
&mut self,
names: &[&str],
f: F
) -> DecodeResult<T> where
F: FnMut(&mut Decoder, usize) -> DecodeResult<T>,
Read an enumeration value. Read more
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>,
[src]
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>,
Read a named data item for an enumeration variant. Read more
fn read_struct<T, F>(
&mut self,
_name: &str,
_len: usize,
f: F
) -> DecodeResult<T> where
F: FnOnce(&mut Decoder) -> DecodeResult<T>,
[src]
fn read_struct<T, F>(
&mut self,
_name: &str,
_len: usize,
f: F
) -> DecodeResult<T> where
F: FnOnce(&mut Decoder) -> DecodeResult<T>,
Read an struct value. Read more
fn read_struct_field<T, F>(
&mut self,
name: &str,
_idx: usize,
f: F
) -> DecodeResult<T> where
F: FnOnce(&mut Decoder) -> DecodeResult<T>,
[src]
fn read_struct_field<T, F>(
&mut self,
name: &str,
_idx: usize,
f: F
) -> DecodeResult<T> where
F: FnOnce(&mut Decoder) -> DecodeResult<T>,
Read a field for a struct value. Read more
fn read_tuple<T, F>(&mut self, tuple_len: usize, f: F) -> DecodeResult<T> where
F: FnOnce(&mut Decoder) -> DecodeResult<T>,
[src]
fn read_tuple<T, F>(&mut self, tuple_len: usize, f: F) -> DecodeResult<T> where
F: FnOnce(&mut Decoder) -> DecodeResult<T>,
Read a tuple value. Read more
fn read_tuple_arg<T, F>(&mut self, idx: usize, f: F) -> DecodeResult<T> where
F: FnOnce(&mut Decoder) -> DecodeResult<T>,
[src]
fn read_tuple_arg<T, F>(&mut self, idx: usize, f: F) -> DecodeResult<T> where
F: FnOnce(&mut Decoder) -> DecodeResult<T>,
Read a data item for a tuple. Read more
fn read_tuple_struct<T, F>(
&mut self,
_name: &str,
len: usize,
f: F
) -> DecodeResult<T> where
F: FnOnce(&mut Decoder) -> DecodeResult<T>,
[src]
fn read_tuple_struct<T, F>(
&mut self,
_name: &str,
len: usize,
f: F
) -> DecodeResult<T> where
F: FnOnce(&mut Decoder) -> DecodeResult<T>,
Read a tuple struct value. Read more
fn read_tuple_struct_arg<T, F>(&mut self, idx: usize, f: F) -> DecodeResult<T> where
F: FnOnce(&mut Decoder) -> DecodeResult<T>,
[src]
fn read_tuple_struct_arg<T, F>(&mut self, idx: usize, f: F) -> DecodeResult<T> where
F: FnOnce(&mut Decoder) -> DecodeResult<T>,
Read a data item for a tuple struct. Read more
fn read_option<T, F>(&mut self, f: F) -> DecodeResult<T> where
F: FnMut(&mut Decoder, bool) -> DecodeResult<T>,
[src]
fn read_option<T, F>(&mut self, f: F) -> DecodeResult<T> where
F: FnMut(&mut Decoder, bool) -> DecodeResult<T>,
Read an optional value. Read more
fn read_seq<T, F>(&mut self, f: F) -> DecodeResult<T> where
F: FnOnce(&mut Decoder, usize) -> DecodeResult<T>,
[src]
fn read_seq<T, F>(&mut self, f: F) -> DecodeResult<T> where
F: FnOnce(&mut Decoder, usize) -> DecodeResult<T>,
Read a sequence of values. Read more
fn read_seq_elt<T, F>(&mut self, _idx: usize, f: F) -> DecodeResult<T> where
F: FnOnce(&mut Decoder) -> DecodeResult<T>,
[src]
fn read_seq_elt<T, F>(&mut self, _idx: usize, f: F) -> DecodeResult<T> where
F: FnOnce(&mut Decoder) -> DecodeResult<T>,
Read an element in the sequence. Read more
fn read_map<T, F>(&mut self, f: F) -> DecodeResult<T> where
F: FnOnce(&mut Decoder, usize) -> DecodeResult<T>,
[src]
fn read_map<T, F>(&mut self, f: F) -> DecodeResult<T> where
F: FnOnce(&mut Decoder, usize) -> DecodeResult<T>,
Read an associative container (map). Read more
fn read_map_elt_key<T, F>(&mut self, _idx: usize, f: F) -> DecodeResult<T> where
F: FnOnce(&mut Decoder) -> DecodeResult<T>,
[src]
fn read_map_elt_key<T, F>(&mut self, _idx: usize, f: F) -> DecodeResult<T> where
F: FnOnce(&mut Decoder) -> DecodeResult<T>,
Read the key for an entry in a map. Read more
fn read_map_elt_val<T, F>(&mut self, _idx: usize, f: F) -> DecodeResult<T> where
F: FnOnce(&mut Decoder) -> DecodeResult<T>,
[src]
fn read_map_elt_val<T, F>(&mut self, _idx: usize, f: F) -> DecodeResult<T> where
F: FnOnce(&mut Decoder) -> DecodeResult<T>,
Read the value for an entry in a map. Read more
fn error(&mut self, err: &str) -> DecoderError
[src]
fn error(&mut self, err: &str) -> DecoderError
Record a decoding error. Read more
Auto Trait Implementations
Blanket Implementations
impl<T> From for T
[src]
impl<T> From for T
impl<T, U> Into for T where
U: From<T>,
[src]
impl<T, U> Into for T where
U: From<T>,
impl<T, U> TryFrom for T where
T: From<U>,
[src]
impl<T, U> TryFrom for T where
T: From<U>,
type Error = !
try_from
)The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
try_from
)Performs the conversion.
impl<T> Borrow for T where
T: ?Sized,
[src]
impl<T> Borrow for T where
T: ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
impl<T> BorrowMut for T where
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
try_from
)The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
try_from
)Performs the conversion.
impl<T> Any for T where
T: 'static + ?Sized,
[src]
impl<T> Any for T where
T: 'static + ?Sized,
fn get_type_id(&self) -> TypeId
[src]
fn get_type_id(&self) -> TypeId
🔬 This is a nightly-only experimental API. (get_type_id
)
this method will likely be replaced by an associated static
Gets the TypeId
of self
. Read more