pub fn to_writer<T: ser::Serialize, W: Write>(
    input: &T,
    writer: &mut W,
) -> Result<()> {
    let mut first = true;
    input.serialize(&mut QsSerializer {
        writer,
        key: None,
        first: &mut first,
    })
}
/// Serializes a value into a generic writer object.
///
/// ```
/// # #[macro_use]
/// # extern crate serde_derive;
/// # extern crate serde_qs;
/// #[derive(Deserialize, Serialize)]
/// struct Query {
///     name: String,
///     age: u8,
///     occupation: String,
/// }
///
/// # fn main(){
/// let q =  Query {
///     name: "Alice".to_owned(),
///     age: 24,
///     occupation: "Student".to_owned(),
/// };
///
/// let mut buffer = Vec::new();
/// serde_qs::to_writer(&q, &mut buffer).unwrap();
/// assert_eq!(
///     String::from_utf8(buffer).unwrap(),
///     "name=Alice&age=24&occupation=Student");
/// # }
/// ```
Serializes a value into a generic writer object.
Serializes a value into a generic writer object .
pub fn to_writer<T: ser::Serialize, W: Write>(
    input: &T,
    writer: &mut W,
) -> Result<()> {
    let mut first = true;
    input.serialize(&mut QsSerializer {
        writer,
        key: None,
        first: &mut first,
    })
}
pub fn to_writer < T : ser :: Serialize , W : Write > ( input : & T , writer : & mut W , ) -> Result < ( ) > { let mut first = true ; input . serialize ( & mut QsSerializer { writer , key : None , first : & mut first , } ) }
Serializes a value into a generic writer object.
Serializes a value into a generic writer object .
input
&T
writer
&mut W
input
&T
writer
&mut W
#[macro_use]
None
extern crate serde_derive;
None
extern crate serde_qs;
None
[derive(deserialize, serialize)]
struct Query {
name: String,
age: u8,
occupation: String,
}
struct Query { name : String age : u8 occupation : String }
fn main(){
let q =  Query {
name: "Alice".to_owned(),
age: 24,
occupation: "Student".to_owned(),
}.

let mut buffer = Vec::new();
serde_qs::to_writer(&q, &mut buffer).unwrap();
assert_eq!(
String::from_utf8(buffer).unwrap(),
"name=Alice&age=24&occupation=Student").
let q = Query { name : " Alice " . to_owned () age : 24 occupation : " Student " . to_owned () } . let mut buffer = Vec :: new () ; serde_qs :: to_writer ( &q &mut buffer ) . unwrap () ; assert_eq! ( String :: from_utf8 ( buffer ) . unwrap () " name = Alice&age = 24&occupation = Student " ) .
}
None