Struct rbml::opaque::Encoder [] [src]

pub struct Encoder<'a> {
    pub cursor: &'a mut Cursor<Vec<u8>>,
}
Unstable (rustc_private)

Fields

cursor: &'a mut Cursor<Vec<u8>>
Unstable (rustc_private)

Methods

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

fn new(cursor: &'a mut Cursor<Vec<u8>>) -> Encoder<'a>

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

fn position(&self) -> usize

fn from_rbml<'b: 'c, 'c>(rbml: &'c mut Encoder<'b>) -> Encoder<'c>

Trait Implementations

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

type Error = Error

fn emit_nil(&mut self) -> EncodeResult

fn emit_uint(&mut self, v: usize) -> EncodeResult

fn emit_u64(&mut self, v: u64) -> EncodeResult

fn emit_u32(&mut self, v: u32) -> EncodeResult

fn emit_u16(&mut self, v: u16) -> EncodeResult

fn emit_u8(&mut self, v: u8) -> EncodeResult

fn emit_int(&mut self, v: isize) -> EncodeResult

fn emit_i64(&mut self, v: i64) -> EncodeResult

fn emit_i32(&mut self, v: i32) -> EncodeResult

fn emit_i16(&mut self, v: i16) -> EncodeResult

fn emit_i8(&mut self, v: i8) -> EncodeResult

fn emit_bool(&mut self, v: bool) -> EncodeResult

fn emit_f64(&mut self, v: f64) -> EncodeResult

fn emit_f32(&mut self, v: f32) -> EncodeResult

fn emit_char(&mut self, v: char) -> EncodeResult

fn emit_str(&mut self, v: &str) -> EncodeResult

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

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

fn emit_enum_variant_arg<F>(&mut self, _: usize, f: F) -> EncodeResult where F: FnOnce(&mut Encoder<'a>) -> EncodeResult

fn emit_enum_struct_variant<F>(&mut self, v_name: &str, v_id: usize, cnt: usize, f: F) -> EncodeResult where F: FnOnce(&mut Encoder<'a>) -> EncodeResult

fn emit_enum_struct_variant_field<F>(&mut self, _: &str, idx: usize, f: F) -> EncodeResult where F: FnOnce(&mut Encoder<'a>) -> EncodeResult

fn emit_struct<F>(&mut self, _: &str, _len: usize, f: F) -> EncodeResult where F: FnOnce(&mut Encoder<'a>) -> EncodeResult

fn emit_struct_field<F>(&mut self, _name: &str, _: usize, f: F) -> EncodeResult where F: FnOnce(&mut Encoder<'a>) -> EncodeResult

fn emit_tuple<F>(&mut self, len: usize, f: F) -> EncodeResult where F: FnOnce(&mut Encoder<'a>) -> EncodeResult

fn emit_tuple_arg<F>(&mut self, idx: usize, f: F) -> EncodeResult where F: FnOnce(&mut Encoder<'a>) -> EncodeResult

fn emit_tuple_struct<F>(&mut self, _: &str, len: usize, f: F) -> EncodeResult where F: FnOnce(&mut Encoder<'a>) -> EncodeResult

fn emit_tuple_struct_arg<F>(&mut self, idx: usize, f: F) -> EncodeResult where F: FnOnce(&mut Encoder<'a>) -> EncodeResult

fn emit_option<F>(&mut self, f: F) -> EncodeResult where F: FnOnce(&mut Encoder<'a>) -> EncodeResult

fn emit_option_none(&mut self) -> EncodeResult

fn emit_option_some<F>(&mut self, f: F) -> EncodeResult where F: FnOnce(&mut Encoder<'a>) -> EncodeResult

fn emit_seq<F>(&mut self, len: usize, f: F) -> EncodeResult where F: FnOnce(&mut Encoder<'a>) -> EncodeResult

fn emit_seq_elt<F>(&mut self, _idx: usize, f: F) -> EncodeResult where F: FnOnce(&mut Encoder<'a>) -> EncodeResult

fn emit_map<F>(&mut self, len: usize, f: F) -> EncodeResult where F: FnOnce(&mut Encoder<'a>) -> EncodeResult

fn emit_map_elt_key<F>(&mut self, _idx: usize, f: F) -> EncodeResult where F: FnOnce(&mut Encoder<'a>) -> EncodeResult

fn emit_map_elt_val<F>(&mut self, _idx: usize, f: F) -> EncodeResult where F: FnOnce(&mut Encoder<'a>) -> EncodeResult