1 2 3 4 5 6 7 8 9 10 11
#[allow(dead_code)] pub struct Serializer<W, F = CompactFormatter> { writer: W, formatter: F, } #[derive(Clone, Debug)] pub struct CompactFormatter; #[derive(Clone, Debug)] pub struct PrettyFormatter;