Trait serde::ser::SeqVisitor [] [src]

pub trait SeqVisitor {
    fn visit<S>(&mut self, serializer: &mut S) -> Result<Option<()>, S::Error> where S: Serializer;

    fn len(&self) -> Option<usize> { ... }
}

A trait that is used by a Serialize to iterate through a sequence.

Required Methods

fn visit<S>(&mut self, serializer: &mut S) -> Result<Option<()>, S::Error> where S: Serializer

Serializes a sequence item in the serializer.

This returns Ok(Some(())) when there are more items to serialize, or Ok(None) when complete.

Provided Methods

fn len(&self) -> Option<usize>

Return the length of the sequence if known.

Implementors