[][src]Trait serialize::serialize::Encoder

pub trait Encoder {
    type Error;
    fn emit_unit(&mut self) -> Result<(), Self::Error>;
fn emit_usize(&mut self, v: usize) -> Result<(), Self::Error>;
fn emit_u128(&mut self, v: u128) -> Result<(), Self::Error>;
fn emit_u64(&mut self, v: u64) -> Result<(), Self::Error>;
fn emit_u32(&mut self, v: u32) -> Result<(), Self::Error>;
fn emit_u16(&mut self, v: u16) -> Result<(), Self::Error>;
fn emit_u8(&mut self, v: u8) -> Result<(), Self::Error>;
fn emit_isize(&mut self, v: isize) -> Result<(), Self::Error>;
fn emit_i128(&mut self, v: i128) -> Result<(), Self::Error>;
fn emit_i64(&mut self, v: i64) -> Result<(), Self::Error>;
fn emit_i32(&mut self, v: i32) -> Result<(), Self::Error>;
fn emit_i16(&mut self, v: i16) -> Result<(), Self::Error>;
fn emit_i8(&mut self, v: i8) -> Result<(), Self::Error>;
fn emit_bool(&mut self, v: bool) -> Result<(), Self::Error>;
fn emit_f64(&mut self, v: f64) -> Result<(), Self::Error>;
fn emit_f32(&mut self, v: f32) -> Result<(), Self::Error>;
fn emit_char(&mut self, v: char) -> Result<(), Self::Error>;
fn emit_str(&mut self, v: &str) -> Result<(), Self::Error>; fn emit_enum<F>(&mut self, _name: &str, f: F) -> Result<(), Self::Error>
    where
        F: FnOnce(&mut Self) -> Result<(), Self::Error>
, { ... }
fn emit_enum_variant<F>(
        &mut self,
        _v_name: &str,
        v_id: usize,
        _len: usize,
        f: F
    ) -> Result<(), Self::Error>
    where
        F: FnOnce(&mut Self) -> Result<(), Self::Error>
, { ... }
fn emit_enum_variant_arg<F>(
        &mut self,
        _a_idx: usize,
        f: F
    ) -> Result<(), Self::Error>
    where
        F: FnOnce(&mut Self) -> Result<(), Self::Error>
, { ... }
fn emit_enum_struct_variant<F>(
        &mut self,
        v_name: &str,
        v_id: usize,
        len: usize,
        f: F
    ) -> Result<(), Self::Error>
    where
        F: FnOnce(&mut Self) -> Result<(), Self::Error>
, { ... }
fn emit_enum_struct_variant_field<F>(
        &mut self,
        _f_name: &str,
        f_idx: usize,
        f: F
    ) -> Result<(), Self::Error>
    where
        F: FnOnce(&mut Self) -> Result<(), Self::Error>
, { ... }
fn emit_struct<F>(
        &mut self,
        _name: &str,
        _len: usize,
        f: F
    ) -> Result<(), Self::Error>
    where
        F: FnOnce(&mut Self) -> Result<(), Self::Error>
, { ... }
fn emit_struct_field<F>(
        &mut self,
        _f_name: &str,
        _f_idx: usize,
        f: F
    ) -> Result<(), Self::Error>
    where
        F: FnOnce(&mut Self) -> Result<(), Self::Error>
, { ... }
fn emit_tuple<F>(&mut self, _len: usize, f: F) -> Result<(), Self::Error>
    where
        F: FnOnce(&mut Self) -> Result<(), Self::Error>
, { ... }
fn emit_tuple_arg<F>(
        &mut self,
        _idx: usize,
        f: F
    ) -> Result<(), Self::Error>
    where
        F: FnOnce(&mut Self) -> Result<(), Self::Error>
, { ... }
fn emit_tuple_struct<F>(
        &mut self,
        _name: &str,
        len: usize,
        f: F
    ) -> Result<(), Self::Error>
    where
        F: FnOnce(&mut Self) -> Result<(), Self::Error>
, { ... }
fn emit_tuple_struct_arg<F>(
        &mut self,
        f_idx: usize,
        f: F
    ) -> Result<(), Self::Error>
    where
        F: FnOnce(&mut Self) -> Result<(), Self::Error>
, { ... }
fn emit_option<F>(&mut self, f: F) -> Result<(), Self::Error>
    where
        F: FnOnce(&mut Self) -> Result<(), Self::Error>
, { ... }
fn emit_option_none(&mut self) -> Result<(), Self::Error> { ... }
fn emit_option_some<F>(&mut self, f: F) -> Result<(), Self::Error>
    where
        F: FnOnce(&mut Self) -> Result<(), Self::Error>
, { ... }
fn emit_seq<F>(&mut self, len: usize, f: F) -> Result<(), Self::Error>
    where
        F: FnOnce(&mut Self) -> Result<(), Self::Error>
, { ... }
fn emit_seq_elt<F>(&mut self, _idx: usize, f: F) -> Result<(), Self::Error>
    where
        F: FnOnce(&mut Self) -> Result<(), Self::Error>
, { ... }
fn emit_map<F>(&mut self, len: usize, f: F) -> Result<(), Self::Error>
    where
        F: FnOnce(&mut Self) -> Result<(), Self::Error>
, { ... }
fn emit_map_elt_key<F>(
        &mut self,
        _idx: usize,
        f: F
    ) -> Result<(), Self::Error>
    where
        F: FnOnce(&mut Self) -> Result<(), Self::Error>
, { ... }
fn emit_map_elt_val<F>(
        &mut self,
        _idx: usize,
        f: F
    ) -> Result<(), Self::Error>
    where
        F: FnOnce(&mut Self) -> Result<(), Self::Error>
, { ... } }
⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

Associated Types

type Error

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

Loading content...

Required methods

fn emit_unit(&mut self) -> Result<(), Self::Error>

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

fn emit_usize(&mut self, v: usize) -> Result<(), Self::Error>

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

fn emit_u128(&mut self, v: u128) -> Result<(), Self::Error>

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

fn emit_u64(&mut self, v: u64) -> Result<(), Self::Error>

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

fn emit_u32(&mut self, v: u32) -> Result<(), Self::Error>

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

fn emit_u16(&mut self, v: u16) -> Result<(), Self::Error>

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

fn emit_u8(&mut self, v: u8) -> Result<(), Self::Error>

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

fn emit_isize(&mut self, v: isize) -> Result<(), Self::Error>

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

fn emit_i128(&mut self, v: i128) -> Result<(), Self::Error>

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

fn emit_i64(&mut self, v: i64) -> Result<(), Self::Error>

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

fn emit_i32(&mut self, v: i32) -> Result<(), Self::Error>

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

fn emit_i16(&mut self, v: i16) -> Result<(), Self::Error>

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

fn emit_i8(&mut self, v: i8) -> Result<(), Self::Error>

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

fn emit_bool(&mut self, v: bool) -> Result<(), Self::Error>

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

fn emit_f64(&mut self, v: f64) -> Result<(), Self::Error>

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

fn emit_f32(&mut self, v: f32) -> Result<(), Self::Error>

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

fn emit_char(&mut self, v: char) -> Result<(), Self::Error>

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

fn emit_str(&mut self, v: &str) -> Result<(), Self::Error>

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

Loading content...

Provided methods

fn emit_enum<F>(&mut self, _name: &str, f: F) -> Result<(), Self::Error> where
    F: FnOnce(&mut Self) -> Result<(), Self::Error>, 

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

fn emit_enum_variant<F>(
    &mut self,
    _v_name: &str,
    v_id: usize,
    _len: usize,
    f: F
) -> Result<(), Self::Error> where
    F: FnOnce(&mut Self) -> Result<(), Self::Error>, 

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

fn emit_enum_variant_arg<F>(
    &mut self,
    _a_idx: usize,
    f: F
) -> Result<(), Self::Error> where
    F: FnOnce(&mut Self) -> Result<(), Self::Error>, 

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

fn emit_enum_struct_variant<F>(
    &mut self,
    v_name: &str,
    v_id: usize,
    len: usize,
    f: F
) -> Result<(), Self::Error> where
    F: FnOnce(&mut Self) -> Result<(), Self::Error>, 

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

fn emit_enum_struct_variant_field<F>(
    &mut self,
    _f_name: &str,
    f_idx: usize,
    f: F
) -> Result<(), Self::Error> where
    F: FnOnce(&mut Self) -> Result<(), Self::Error>, 

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

fn emit_struct<F>(
    &mut self,
    _name: &str,
    _len: usize,
    f: F
) -> Result<(), Self::Error> where
    F: FnOnce(&mut Self) -> Result<(), Self::Error>, 

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

fn emit_struct_field<F>(
    &mut self,
    _f_name: &str,
    _f_idx: usize,
    f: F
) -> Result<(), Self::Error> where
    F: FnOnce(&mut Self) -> Result<(), Self::Error>, 

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

fn emit_tuple<F>(&mut self, _len: usize, f: F) -> Result<(), Self::Error> where
    F: FnOnce(&mut Self) -> Result<(), Self::Error>, 

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

fn emit_tuple_arg<F>(&mut self, _idx: usize, f: F) -> Result<(), Self::Error> where
    F: FnOnce(&mut Self) -> Result<(), Self::Error>, 

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

fn emit_tuple_struct<F>(
    &mut self,
    _name: &str,
    len: usize,
    f: F
) -> Result<(), Self::Error> where
    F: FnOnce(&mut Self) -> Result<(), Self::Error>, 

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

fn emit_tuple_struct_arg<F>(
    &mut self,
    f_idx: usize,
    f: F
) -> Result<(), Self::Error> where
    F: FnOnce(&mut Self) -> Result<(), Self::Error>, 

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

fn emit_option<F>(&mut self, f: F) -> Result<(), Self::Error> where
    F: FnOnce(&mut Self) -> Result<(), Self::Error>, 

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

fn emit_option_none(&mut self) -> Result<(), Self::Error>

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

fn emit_option_some<F>(&mut self, f: F) -> Result<(), Self::Error> where
    F: FnOnce(&mut Self) -> Result<(), Self::Error>, 

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

fn emit_seq<F>(&mut self, len: usize, f: F) -> Result<(), Self::Error> where
    F: FnOnce(&mut Self) -> Result<(), Self::Error>, 

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

fn emit_seq_elt<F>(&mut self, _idx: usize, f: F) -> Result<(), Self::Error> where
    F: FnOnce(&mut Self) -> Result<(), Self::Error>, 

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

fn emit_map<F>(&mut self, len: usize, f: F) -> Result<(), Self::Error> where
    F: FnOnce(&mut Self) -> Result<(), Self::Error>, 

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

fn emit_map_elt_key<F>(&mut self, _idx: usize, f: F) -> Result<(), Self::Error> where
    F: FnOnce(&mut Self) -> Result<(), Self::Error>, 

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

fn emit_map_elt_val<F>(&mut self, _idx: usize, f: F) -> Result<(), Self::Error> where
    F: FnOnce(&mut Self) -> Result<(), Self::Error>, 

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

Loading content...

Implementors

impl Encoder for serialize::opaque::Encoder[src]

type Error = !

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

impl<'a> Encoder for serialize::json::Encoder<'a>[src]

type Error = EncoderError

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

impl<'a> Encoder for PrettyEncoder<'a>[src]

type Error = EncoderError

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

Loading content...