pub fn serialize<Wr, T>(writer: Wr, node: &T, opts: SerializeOpts) -> Result<()>where Wr: Write, T: Serialize,
Method for serializing generic node to a given writer.