mod buffer; mod writer; #[cfg(any(feature = "std", feature = "alloc"))] use crate::se::*; pub use self::writer::*; pub use self::buffer::*; #[cfg(any(feature = "std", feature = "alloc"))] pub fn to_string(value: T) -> Result> where T: Serialize { let mut w = GenericWriter::from(Vec::new()); let mut s = BaseSerializer::new(&mut w); value.serialize(&mut s)?; Ok(w.to_string()) }