Skip to main content

Deserializer

Trait Deserializer 

Source
pub trait Deserializer {
Show 20 methods // Required methods fn read_u8(&mut self) -> Result<u8, String>; fn read_u16(&mut self) -> Result<u16, String>; fn read_u32(&mut self) -> Result<u32, String>; fn read_u64(&mut self) -> Result<u64, String>; fn read_u128(&mut self) -> Result<u128, String>; fn read_i8(&mut self) -> Result<i8, String>; fn read_i16(&mut self) -> Result<i16, String>; fn read_i32(&mut self) -> Result<i32, String>; fn read_i64(&mut self) -> Result<i64, String>; fn read_i128(&mut self) -> Result<i128, String>; fn read_f32(&mut self) -> Result<f32, String>; fn read_f64(&mut self) -> Result<f64, String>; fn read_bool(&mut self) -> Result<bool, String>; fn read_bytes(&mut self) -> Result<Vec<u8>, String>; fn read_string(&mut self) -> Result<String, String>; fn read_seq<F, T>(&mut self, f: F) -> Result<T, String> where F: FnOnce(&mut Self, usize) -> Result<T, String>; fn read_map<F, T>(&mut self, f: F) -> Result<T, String> where F: FnOnce(&mut Self, usize) -> Result<T, String>; fn read_tuple<F, T>(&mut self, len: usize, f: F) -> Result<T, String> where F: FnOnce(&mut Self) -> Result<T, String>; fn read_struct<F, T>( &mut self, name: &str, fields: &[&str], f: F, ) -> Result<T, String> where F: FnOnce(&mut Self) -> Result<T, String>; fn read_enum<F, T>( &mut self, enum_name: &str, variants: &[&str], f: F, ) -> Result<T, String> where F: FnOnce(&mut Self, u32) -> Result<T, String>;
}

Required Methods§

Source

fn read_u8(&mut self) -> Result<u8, String>

Source

fn read_u16(&mut self) -> Result<u16, String>

Source

fn read_u32(&mut self) -> Result<u32, String>

Source

fn read_u64(&mut self) -> Result<u64, String>

Source

fn read_u128(&mut self) -> Result<u128, String>

Source

fn read_i8(&mut self) -> Result<i8, String>

Source

fn read_i16(&mut self) -> Result<i16, String>

Source

fn read_i32(&mut self) -> Result<i32, String>

Source

fn read_i64(&mut self) -> Result<i64, String>

Source

fn read_i128(&mut self) -> Result<i128, String>

Source

fn read_f32(&mut self) -> Result<f32, String>

Source

fn read_f64(&mut self) -> Result<f64, String>

Source

fn read_bool(&mut self) -> Result<bool, String>

Source

fn read_bytes(&mut self) -> Result<Vec<u8>, String>

Source

fn read_string(&mut self) -> Result<String, String>

Source

fn read_seq<F, T>(&mut self, f: F) -> Result<T, String>
where F: FnOnce(&mut Self, usize) -> Result<T, String>,

Source

fn read_map<F, T>(&mut self, f: F) -> Result<T, String>
where F: FnOnce(&mut Self, usize) -> Result<T, String>,

Source

fn read_tuple<F, T>(&mut self, len: usize, f: F) -> Result<T, String>
where F: FnOnce(&mut Self) -> Result<T, String>,

Source

fn read_struct<F, T>( &mut self, name: &str, fields: &[&str], f: F, ) -> Result<T, String>
where F: FnOnce(&mut Self) -> Result<T, String>,

Source

fn read_enum<F, T>( &mut self, enum_name: &str, variants: &[&str], f: F, ) -> Result<T, String>
where F: FnOnce(&mut Self, u32) -> Result<T, String>,

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§