Trait slog::ser::Serialize
[−]
[src]
pub trait Serialize { fn serialize(
&self,
record: &Record,
key: &'static str,
serializer: &mut Serializer
) -> Result<(), Error>; }
Value that can be serialized
Loggers require values in key-value pairs to implement this trait.
Required Methods
fn serialize(
&self,
record: &Record,
key: &'static str,
serializer: &mut Serializer
) -> Result<(), Error>
&self,
record: &Record,
key: &'static str,
serializer: &mut Serializer
) -> Result<(), Error>
Serialize self into Serializer
Structs implementing this trait should generally
only call respective methods of serializer
.
Implementors
impl Serialize for usize
impl Serialize for isize
impl Serialize for bool
impl Serialize for char
impl Serialize for u8
impl Serialize for i8
impl Serialize for u16
impl Serialize for i16
impl Serialize for u32
impl Serialize for i32
impl Serialize for f32
impl Serialize for u64
impl Serialize for i64
impl Serialize for f64
impl Serialize for ()
impl Serialize for str
impl<'a> Serialize for &'a str
impl<'a> Serialize for Arguments<'a>
impl Serialize for String
impl<T: Serialize> Serialize for Option<T>
impl Serialize for Box<Serialize + Send + 'static>
impl<T> Serialize for Arc<T> where
T: Serialize,impl<T> Serialize for Rc<T> where
T: Serialize,impl<T> Serialize for Wrapping<T> where
T: Serialize,impl<S: 'static + Serialize, F> Serialize for F where
F: 'static + for<'c, 'd> Fn(&'c Record<'d>) -> S,impl<F> Serialize for PushLazy<F> where
F: 'static + for<'c, 'd> Fn(&'c Record<'d>, ValueSerializer<'c>) -> Result<(), Error>,