Function sgf_parse::serialize[][src]

pub fn serialize<'a>(nodes: impl IntoIterator<Item = &'a SgfNode>) -> String

Returns the SGF as a String from a collection of SgfNode objects.

Examples

use sgf_parse::{parse, serialize};

let original = "(;SZ[13:13];B[de](;W[ef])(;W[de];B[ac]))";
let nodes = parse(original).unwrap();
let parsed = serialize(&nodes);

assert_eq!(parsed, original);