Trait serde::de::EnumVisitor [] [src]

pub trait EnumVisitor {
    type Error: Error;
    type Variant: VariantVisitor<Error=Self::Error>;
    fn visit_variant<V>(self) -> Result<(V, Self::Variant), Self::Error> where V: Deserialize;
}

EnumVisitor is a visitor that is created by the Deserializer and passed to the Deserialize in order to identify which variant of an enum to deserialize.

Associated Types

The error type that can be returned if some error occurs during deserialization.

The Visitor that will be used to deserialize the content of the enum variant.

Required Methods

visit_variant is called to identify which variant to deserialize.

Implementors