Struct rustc_ap_rustc_serialize::json::Decoder[][src]

pub struct Decoder { /* fields omitted */ }
Expand description

A structure to decode JSON to values in rust.

Implementations

impl Decoder[src]

pub fn new(json: Json) -> Decoder[src]

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

Trait Implementations

impl Decoder for Decoder[src]

type Error = DecoderError

fn read_nil(&mut self) -> DecodeResult<()>[src]

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

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

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

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

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

fn read_u128(&mut self) -> DecodeResult<u128>[src]

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

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

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

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

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

fn read_i128(&mut self) -> DecodeResult<i128>[src]

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

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

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

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

fn read_str(&mut self) -> DecodeResult<Cow<'_, str>>[src]

fn read_raw_bytes_into(&mut self, s: &mut [u8]) -> Result<(), Self::Error>[src]

fn read_enum<T, F>(&mut self, _name: &str, f: F) -> DecodeResult<T> where
    F: FnOnce(&mut Decoder) -> 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>, 
[src]

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_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_field<T, F>(
    &mut self,
    _name: &str,
    idx: 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>, 
[src]

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_tuple<T, F>(&mut self, tuple_len: 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>, 
[src]

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_arg<T, F>(&mut self, idx: usize, f: F) -> DecodeResult<T> where
    F: FnOnce(&mut Decoder) -> DecodeResult<T>, 
[src]

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

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

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

fn read_map<T, F>(&mut self, f: F) -> DecodeResult<T> where
    F: FnOnce(&mut Decoder, usize) -> 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>, 
[src]

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

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

Auto Trait Implementations

impl RefUnwindSafe for Decoder

impl Send for Decoder

impl Sync for Decoder

impl Unpin for Decoder

impl UnwindSafe for Decoder

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

impl<T> From<T> for T[src]

pub fn from(t: T) -> T[src]

Performs the conversion.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

pub fn into(self) -> U[src]

Performs the conversion.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]

Performs the conversion.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]

Performs the conversion.