Trait slog::ser::Serializer
[−]
[src]
pub trait Serializer { fn emit_bool(&mut self, key: &'static str, val: bool) -> Result; fn emit_unit(&mut self, key: &'static str) -> Result; fn emit_none(&mut self, key: &'static str) -> Result; fn emit_char(&mut self, key: &'static str, val: char) -> Result; fn emit_u8(&mut self, key: &'static str, val: u8) -> Result; fn emit_i8(&mut self, key: &'static str, val: i8) -> Result; fn emit_u16(&mut self, key: &'static str, val: u16) -> Result; fn emit_i16(&mut self, key: &'static str, val: i16) -> Result; fn emit_u32(&mut self, key: &'static str, val: u32) -> Result; fn emit_i32(&mut self, key: &'static str, val: i32) -> Result; fn emit_f32(&mut self, key: &'static str, val: f32) -> Result; fn emit_u64(&mut self, key: &'static str, val: u64) -> Result; fn emit_i64(&mut self, key: &'static str, val: i64) -> Result; fn emit_f64(&mut self, key: &'static str, val: f64) -> Result; fn emit_usize(&mut self, key: &'static str, val: usize) -> Result; fn emit_isize(&mut self, key: &'static str, val: isize) -> Result; fn emit_str(&mut self, key: &'static str, val: &str) -> Result; fn emit_arguments(&mut self, key: &'static str, val: &Arguments) -> Result; }
Serializer
Drains using Format
will internally use
types implementing this trait.
Required Methods
fn emit_bool(&mut self, key: &'static str, val: bool) -> Result
Emit bool
fn emit_unit(&mut self, key: &'static str) -> Result
Emit ()
fn emit_none(&mut self, key: &'static str) -> Result
Emit None
fn emit_char(&mut self, key: &'static str, val: char) -> Result
Emit char
fn emit_u8(&mut self, key: &'static str, val: u8) -> Result
Emit u8
fn emit_i8(&mut self, key: &'static str, val: i8) -> Result
Emit i8
fn emit_u16(&mut self, key: &'static str, val: u16) -> Result
Emit u16
fn emit_i16(&mut self, key: &'static str, val: i16) -> Result
Emit i16
fn emit_u32(&mut self, key: &'static str, val: u32) -> Result
Emit u32
fn emit_i32(&mut self, key: &'static str, val: i32) -> Result
Emit i32
fn emit_f32(&mut self, key: &'static str, val: f32) -> Result
Emit f32
fn emit_u64(&mut self, key: &'static str, val: u64) -> Result
Emit u64
fn emit_i64(&mut self, key: &'static str, val: i64) -> Result
Emit i64
fn emit_f64(&mut self, key: &'static str, val: f64) -> Result
Emit f64
fn emit_usize(&mut self, key: &'static str, val: usize) -> Result
Emit usize
fn emit_isize(&mut self, key: &'static str, val: isize) -> Result
Emit isize
fn emit_str(&mut self, key: &'static str, val: &str) -> Result
Emit str
fn emit_arguments(&mut self, key: &'static str, val: &Arguments) -> Result
Emit fmt::Arguments