@@ -9,48 +9,8 @@ use self::var::{Map, Struct};
99mod var;
1010
1111
12-
13- /// A convenience method for serializing some object to a buffer.
14- ///
15- /// You'll almost always want to use this over any of the other things in the
16- /// `serde_xml_rs::serialize` module.
17- ///
18- ///
19- /// # Examples
20- ///
21- /// ```rust
22- /// # #[macro_use]
23- /// # extern crate serde_derive;
24- /// # extern crate serde;
25- /// # extern crate serde_xml_rs;
26- /// # use serde_xml_rs::serialize;
27- /// #[derive(Serialize)]
28- /// struct Person {
29- /// name: String,
30- /// age: u32,
31- /// }
32- ///
33- /// # fn main() {
34- /// let mut buffer = Vec::new();
35- /// let joe = Person {name: "Joe".to_string(), age: 42};
36- ///
37- /// serialize(&joe, &mut buffer).unwrap();
38- ///
39- /// let serialized = String::from_utf8(buffer).unwrap();
40- /// println!("{}", serialized);
41- /// # }
42- /// ```
43- pub fn serialize < W : Write , S : Serialize > ( value : S , writer : W ) -> Result < ( ) > {
44- to_writer ( writer, & value)
45- }
46-
47-
4812/// A convenience method for serializing some object to a buffer.
4913///
50- /// You'll almost always want to use this over any of the other things in the
51- /// `serde_xml_rs::to_writer` module.
52- ///
53- ///
5414/// # Examples
5515///
5616/// ```rust
@@ -83,10 +43,6 @@ pub fn to_writer<W: Write, S: Serialize>(writer: W, value: &S) -> Result<()> {
8343
8444/// A convenience method for serializing some object to a string.
8545///
86- /// You'll almost always want to use this over any of the other things in the
87- /// `serde_xml_rs::to_string` module.
88- ///
89- ///
9046/// # Examples
9147///
9248/// ```rust
0 commit comments