Struct bincode::rustc_serialize::SizeChecker [] [src]

pub struct SizeChecker {
    pub size_limit: u64,
    pub written: u64,
}

Fields

size_limit
written

Methods

impl SizeChecker

fn new(limit: u64) -> SizeChecker

Trait Implementations

impl Encoder for SizeChecker

type Error = EncodingError

fn emit_nil(&mut self) -> EncodingResult<()>

fn emit_usize(&mut self, v: usize) -> EncodingResult<()>

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

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

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

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

fn emit_isize(&mut self, v: isize) -> EncodingResult<()>

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

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

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

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

fn emit_bool(&mut self, _: bool) -> EncodingResult<()>

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

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

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

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

fn emit_enum<F>(&mut self, __: &str, f: F) -> EncodingResult<()> where F: FnOnce(&mut SizeChecker) -> EncodingResult<()>

fn emit_enum_variant<F>(&mut self, _: &str, v_id: usize, _: usize, f: F) -> EncodingResult<()> where F: FnOnce(&mut SizeChecker) -> EncodingResult<()>

fn emit_enum_variant_arg<F>(&mut self, _: usize, f: F) -> EncodingResult<()> where F: FnOnce(&mut SizeChecker) -> EncodingResult<()>

fn emit_enum_struct_variant<F>(&mut self, _: &str, _: usize, _: usize, f: F) -> EncodingResult<()> where F: FnOnce(&mut SizeChecker) -> EncodingResult<()>

fn emit_enum_struct_variant_field<F>(&mut self, _: &str, _: usize, f: F) -> EncodingResult<()> where F: FnOnce(&mut SizeChecker) -> EncodingResult<()>

fn emit_struct<F>(&mut self, _: &str, _: usize, f: F) -> EncodingResult<()> where F: FnOnce(&mut SizeChecker) -> EncodingResult<()>

fn emit_struct_field<F>(&mut self, _: &str, _: usize, f: F) -> EncodingResult<()> where F: FnOnce(&mut SizeChecker) -> EncodingResult<()>

fn emit_tuple<F>(&mut self, _: usize, f: F) -> EncodingResult<()> where F: FnOnce(&mut SizeChecker) -> EncodingResult<()>

fn emit_tuple_arg<F>(&mut self, _: usize, f: F) -> EncodingResult<()> where F: FnOnce(&mut SizeChecker) -> EncodingResult<()>

fn emit_tuple_struct<F>(&mut self, _: &str, len: usize, f: F) -> EncodingResult<()> where F: FnOnce(&mut SizeChecker) -> EncodingResult<()>

fn emit_tuple_struct_arg<F>(&mut self, f_idx: usize, f: F) -> EncodingResult<()> where F: FnOnce(&mut SizeChecker) -> EncodingResult<()>

fn emit_option<F>(&mut self, f: F) -> EncodingResult<()> where F: FnOnce(&mut SizeChecker) -> EncodingResult<()>

fn emit_option_none(&mut self) -> EncodingResult<()>

fn emit_option_some<F>(&mut self, f: F) -> EncodingResult<()> where F: FnOnce(&mut SizeChecker) -> EncodingResult<()>

fn emit_seq<F>(&mut self, len: usize, f: F) -> EncodingResult<()> where F: FnOnce(&mut SizeChecker) -> EncodingResult<()>

fn emit_seq_elt<F>(&mut self, _: usize, f: F) -> EncodingResult<()> where F: FnOnce(&mut SizeChecker) -> EncodingResult<()>

fn emit_map<F>(&mut self, len: usize, f: F) -> EncodingResult<()> where F: FnOnce(&mut SizeChecker) -> EncodingResult<()>

fn emit_map_elt_key<F>(&mut self, _: usize, f: F) -> EncodingResult<()> where F: FnOnce(&mut SizeChecker) -> EncodingResult<()>

fn emit_map_elt_val<F>(&mut self, _: usize, f: F) -> EncodingResult<()> where F: FnOnce(&mut SizeChecker) -> EncodingResult<()>