pub fn to_writer<W, T>(value: &T, writer: W) -> Result<(), Error>where W: Write, W::Error: Display + 'static, T: ?Sized + Serialize,