pub trait ProductVisitor<'de> {
    type Output;

    // Required methods
    fn product_name(&self) -> Option<&str>;
    fn product_len(&self) -> usize;
    fn visit_seq_product<A: SeqProductAccess<'de>>(
        self,
        prod: A
    ) -> Result<Self::Output, A::Error>;
    fn visit_named_product<A: NamedProductAccess<'de>>(
        self,
        prod: A
    ) -> Result<Self::Output, A::Error>;

    // Provided method
    fn product_kind(&self) -> ProductKind { ... }
}
Expand description

A visitor walking through a Deserializer for products.

Required Associated Types§

source

type Output

The resulting product.

Required Methods§

source

fn product_name(&self) -> Option<&str>

Returns the name of the product, if any.

source

fn product_len(&self) -> usize

Returns the length of the product.

source

fn visit_seq_product<A: SeqProductAccess<'de>>( self, prod: A ) -> Result<Self::Output, A::Error>

The input contains an unnamed product.

source

fn visit_named_product<A: NamedProductAccess<'de>>( self, prod: A ) -> Result<Self::Output, A::Error>

The input contains a named product.

Provided Methods§

source

fn product_kind(&self) -> ProductKind

Returns the kind of the product.

Object Safety§

This trait is not object safe.

Implementors§