Trait serde::ser::SerializeStructVariant [] [src]

pub trait SerializeStructVariant {
    type Ok;
    type Error: Error;
    fn serialize_field<V: Serialize>(&mut self,
                                     key: &'static str,
                                     value: V)
                                     -> Result<(), Self::Error>; fn end(self) -> Result<Self::Ok, Self::Error>; }

Returned from Serializer::serialize_struct_variant.

Associated Types

Trickery to enforce correct use of the Serialize trait. Every SerializeStructVariant should set Ok = ().

The error type when some error occurs during serialization.

Required Methods

Serialize a struct variant element.

Finishes serializing a struct variant.

Implementors