pub fn write<T: ?Sized + Serialize>(w: impl Write, x: &T) -> Result<()>
parse
yaml
Serialize the value into YAML and write into the writer