Function nbt::serialize::to_writer [] [src]

pub fn to_writer<W, T>(dst: &mut W, obj: &T) -> Result<()> where W: Write, T: NbtFmt

Serializes an object into NBT format at a given destination.

This function will try to ensure that the output is always a valid NBT file, i.e. that it has a top-level Compound.