[][src]Trait serde::de::SeqVisitor

pub trait SeqVisitor {
    type Error: Error;
    fn visit<T>(&mut self) -> Result<Option<T>, Self::Error>
    where
        T: Deserialize
;
fn end(&mut self) -> Result<(), Self::Error>; fn size_hint(&self) -> (usize, Option<usize>) { ... } }

SeqVisitor visits each item in a sequence.

This is a trait that a Deserializer passes to a Visitor implementation, which deserializes each item in a sequence.

Associated Types

type Error: Error

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

Loading content...

Required methods

fn visit<T>(&mut self) -> Result<Option<T>, Self::Error> where
    T: Deserialize

This returns a Ok(Some(value)) for the next value in the sequence, or Ok(None) if there are no more remaining items.

fn end(&mut self) -> Result<(), Self::Error>

This signals to the SeqVisitor that the Visitor does not expect any more items.

Loading content...

Provided methods

fn size_hint(&self) -> (usize, Option<usize>)

Return the lower and upper bound of items remaining in the sequence.

Loading content...

Implementations on Foreign Types

impl<'a, V> SeqVisitor for &'a mut V where
    V: SeqVisitor
[src]

type Error = V::Error

Loading content...

Implementors

impl<I, K, V, E> SeqVisitor for MapDeserializer<I, K, V, E> where
    I: Iterator<Item = (K, V)>,
    K: ValueDeserializer<E>,
    V: ValueDeserializer<E>,
    E: Error
[src]

type Error = E

impl<I, T, E> SeqVisitor for SeqDeserializer<I, E> where
    I: Iterator<Item = T>,
    T: ValueDeserializer<E>,
    E: Error
[src]

type Error = E

Loading content...