Trait serde::ser::SerializeTupleStruct
[−]
[src]
pub trait SerializeTupleStruct { type Ok; type Error: Error; fn serialize_field<T: Serialize>(&mut self,
value: T)
-> Result<(), Self::Error>; fn end(self) -> Result<Self::Ok, Self::Error>; }
Returned from Serializer::serialize_tuple_struct
.
Associated Types
type Ok
Trickery to enforce correct use of the Serialize
trait. Every
SerializeTupleStruct
should set Ok = ()
.
type Error: Error
The error type when some error occurs during serialization.
Required Methods
fn serialize_field<T: Serialize>(&mut self, value: T) -> Result<(), Self::Error>
Serializes a tuple struct element.
fn end(self) -> Result<Self::Ok, Self::Error>
Finishes serializing a tuple struct.