use super::{Format, StandardFormat}; pub trait Config { type Format: Format; /// `struct $name { ..., ... }` const TAG_STRUCTS: bool = false; /// `struct $name ( ... )` const TAG_NEWTYPE_STRUCTS: bool = false; /// `struct $name ( ..., ... )` const TAG_TUPLE_STRUCTS: bool = false; /// `enum { $name ( ..., ... ) }` const TAG_TUPLE_VARIANTS: bool = false; /// `enum { $name { ..., ... } }` const TAG_STRUCT_VARIANTS: bool = false; /// `struct $name` const UNIT_STRUCT_TO_KIND: bool = false; /// The initial size of the stack used for /// checking if a value was tagged or not /// as it ascends nesting. const INITIAL_TAG_STACK_SIZE: usize = 265; /// Disable string escaping (DANGEROUS!) const DISABLE_STRING_ESCAPING: bool = false; } pub struct DefaultConfig; impl Config for DefaultConfig { type Format = StandardFormat; const UNIT_STRUCT_TO_KIND: bool = true; const TAG_NEWTYPE_STRUCTS: bool = true; }