Struct sise::CompactSerializeStyle
source · pub struct CompactSerializeStyle { /* private fields */ }
Expand description
Compact style that only inserts spaces between list elements.
Example
use sise::sise_expr;
let tree = sise_expr!(["example", ["1", "2", "3"], ["a", "b", "c"]]);
let compact = sise::serialize(&tree, &mut sise::CompactSerializeStyle::new());
assert_eq!(compact, "(example (1 2 3) (a b c))");
Implementations§
Trait Implementations§
source§impl Debug for CompactSerializeStyle
impl Debug for CompactSerializeStyle
source§impl<'a> SerializeStyle<'a> for CompactSerializeStyle
impl<'a> SerializeStyle<'a> for CompactSerializeStyle
source§fn begin(&mut self, _output: &mut String)
fn begin(&mut self, _output: &mut String)
Called at the beginning of the serialization (nothing has been writen to
output yet). Read more
source§fn begin_list(&mut self, _list_node: &'a Node, output: &mut String)
fn begin_list(&mut self, _list_node: &'a Node, output: &mut String)
Called at the beginning of a list (before writing
(
to output
)source§fn end_list(&mut self, _output: &mut String)
fn end_list(&mut self, _output: &mut String)
Called at the end of a list (before writing
)
to output
)