Trait serde::ser::SerializeTuple [] [src]

pub trait SerializeTuple {
    type Ok;
    type Error: Error;
    fn serialize_element<T: ?Sized + Serialize>(
        &mut self,
        value: &T
    ) -> Result<(), Self::Error>; fn end(self) -> Result<Self::Ok, Self::Error>; }

Returned from Serializer::serialize_tuple.

let mut tup = serializer.serialize_tuple(3)?;
tup.serialize_element(&self.0)?;
tup.serialize_element(&self.1)?;
tup.serialize_element(&self.2)?;
tup.end()

Associated Types

Must match the Ok type of our Serializer.

Must match the Error type of our Serializer.

Required Methods

Serialize a tuple element.

Finish serializing a tuple.

Implementors