pub struct Decoder { /* private fields */ }
Expand description
A structure to decode JSON to values in rust.
Implementations§
Trait Implementations§
Source§impl Decoder for Decoder
impl Decoder for Decoder
Source§type Error = DecoderError
type Error = DecoderError
The error type for method results.
Source§fn read_nil(&mut self) -> DecodeResult<()>
fn read_nil(&mut self) -> DecodeResult<()>
Read a nil value.
Source§fn read_usize(&mut self) -> DecodeResult<usize>
fn read_usize(&mut self) -> DecodeResult<usize>
Read a usize value.
Source§fn read_u8(&mut self) -> DecodeResult<u8>
fn read_u8(&mut self) -> DecodeResult<u8>
Read a u8 value.
Source§fn read_u16(&mut self) -> DecodeResult<u16>
fn read_u16(&mut self) -> DecodeResult<u16>
Read a u16 value.
Source§fn read_u32(&mut self) -> DecodeResult<u32>
fn read_u32(&mut self) -> DecodeResult<u32>
Read a u32 value.
Source§fn read_u64(&mut self) -> DecodeResult<u64>
fn read_u64(&mut self) -> DecodeResult<u64>
Read a u64 value.
Source§fn read_isize(&mut self) -> DecodeResult<isize>
fn read_isize(&mut self) -> DecodeResult<isize>
Read a isize value.
Source§fn read_i8(&mut self) -> DecodeResult<i8>
fn read_i8(&mut self) -> DecodeResult<i8>
Read a i8 value.
Source§fn read_i16(&mut self) -> DecodeResult<i16>
fn read_i16(&mut self) -> DecodeResult<i16>
Read a i16 value.
Source§fn read_i32(&mut self) -> DecodeResult<i32>
fn read_i32(&mut self) -> DecodeResult<i32>
Read a i32 value.
Source§fn read_i64(&mut self) -> DecodeResult<i64>
fn read_i64(&mut self) -> DecodeResult<i64>
Read a i64 value.
Source§fn read_f32(&mut self) -> DecodeResult<f32>
fn read_f32(&mut self) -> DecodeResult<f32>
Read a f32 value.
Source§fn read_f64(&mut self) -> DecodeResult<f64>
fn read_f64(&mut self) -> DecodeResult<f64>
Read a f64 value.
Source§fn read_bool(&mut self) -> DecodeResult<bool>
fn read_bool(&mut self) -> DecodeResult<bool>
Read a bool value.
Source§fn read_char(&mut self) -> DecodeResult<char>
fn read_char(&mut self) -> DecodeResult<char>
Read a char value.
Source§fn read_str(&mut self) -> DecodeResult<String>
fn read_str(&mut self) -> DecodeResult<String>
Read a string value.
Source§fn read_enum<T, F>(&mut self, _name: &str, f: F) -> DecodeResult<T>
fn read_enum<T, F>(&mut self, _name: &str, f: F) -> DecodeResult<T>
Read an enumeration value. Read more
Source§fn read_enum_variant<T, F>(&mut self, names: &[&str], f: F) -> DecodeResult<T>
fn read_enum_variant<T, F>(&mut self, names: &[&str], f: F) -> DecodeResult<T>
Read an enumeration value. Read more
Source§fn read_enum_variant_arg<T, F>(&mut self, _idx: usize, f: F) -> DecodeResult<T>
fn read_enum_variant_arg<T, F>(&mut self, _idx: usize, f: F) -> DecodeResult<T>
Read an unnamed data item for an enumeration variant. Read more
Source§fn read_enum_struct_variant<T, F>(
&mut self,
names: &[&str],
f: F,
) -> DecodeResult<T>
fn read_enum_struct_variant<T, F>( &mut self, names: &[&str], f: F, ) -> DecodeResult<T>
Read an enumeration value. Read more
Source§fn read_enum_struct_variant_field<T, F>(
&mut self,
_name: &str,
idx: usize,
f: F,
) -> DecodeResult<T>
fn read_enum_struct_variant_field<T, F>( &mut self, _name: &str, idx: usize, f: F, ) -> DecodeResult<T>
Read a named data item for an enumeration variant. Read more
Source§fn read_struct<T, F>(
&mut self,
_name: &str,
_len: usize,
f: F,
) -> DecodeResult<T>
fn read_struct<T, F>( &mut self, _name: &str, _len: usize, f: F, ) -> DecodeResult<T>
Read an struct value. Read more
Source§fn read_struct_field<T, F>(
&mut self,
name: &str,
_idx: usize,
f: F,
) -> DecodeResult<T>
fn read_struct_field<T, F>( &mut self, name: &str, _idx: usize, f: F, ) -> DecodeResult<T>
Read a field for a struct value. Read more
Source§fn read_tuple<T, F>(&mut self, tuple_len: usize, f: F) -> DecodeResult<T>
fn read_tuple<T, F>(&mut self, tuple_len: usize, f: F) -> DecodeResult<T>
Read a tuple value. Read more
Source§fn read_tuple_arg<T, F>(&mut self, idx: usize, f: F) -> DecodeResult<T>
fn read_tuple_arg<T, F>(&mut self, idx: usize, f: F) -> DecodeResult<T>
Read a data item for a tuple. Read more
Source§fn read_tuple_struct<T, F>(
&mut self,
_name: &str,
len: usize,
f: F,
) -> DecodeResult<T>
fn read_tuple_struct<T, F>( &mut self, _name: &str, len: usize, f: F, ) -> DecodeResult<T>
Read a tuple struct value. Read more
Source§fn read_tuple_struct_arg<T, F>(&mut self, idx: usize, f: F) -> DecodeResult<T>
fn read_tuple_struct_arg<T, F>(&mut self, idx: usize, f: F) -> DecodeResult<T>
Read a data item for a tuple struct. Read more
Source§fn read_option<T, F>(&mut self, f: F) -> DecodeResult<T>
fn read_option<T, F>(&mut self, f: F) -> DecodeResult<T>
Read an optional value. Read more
Source§fn read_seq<T, F>(&mut self, f: F) -> DecodeResult<T>
fn read_seq<T, F>(&mut self, f: F) -> DecodeResult<T>
Read a sequence of values. Read more
Source§fn read_seq_elt<T, F>(&mut self, _idx: usize, f: F) -> DecodeResult<T>
fn read_seq_elt<T, F>(&mut self, _idx: usize, f: F) -> DecodeResult<T>
Read an element in the sequence. Read more
Source§fn read_map<T, F>(&mut self, f: F) -> DecodeResult<T>
fn read_map<T, F>(&mut self, f: F) -> DecodeResult<T>
Read an associative container (map). Read more
Source§fn read_map_elt_key<T, F>(&mut self, _idx: usize, f: F) -> DecodeResult<T>
fn read_map_elt_key<T, F>(&mut self, _idx: usize, f: F) -> DecodeResult<T>
Read the key for an entry in a map. Read more
Source§fn read_map_elt_val<T, F>(&mut self, _idx: usize, f: F) -> DecodeResult<T>
fn read_map_elt_val<T, F>(&mut self, _idx: usize, f: F) -> DecodeResult<T>
Read the value for an entry in a map. Read more
Auto Trait Implementations§
impl Freeze for Decoder
impl RefUnwindSafe for Decoder
impl Send for Decoder
impl Sync for Decoder
impl Unpin for Decoder
impl UnwindSafe for Decoder
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