pub trait ListVisitor: Sized + Sealed {
    type Result;

    fn visit_item<T: Display>(&mut self, item: T) -> ControlFlow<Self::Result>;
    fn finish(self) -> Self::Result;

    fn visit_items_and_finish<T, I>(self, items: I) -> Self::Result
   where
        T: Display,
        I: IntoIterator<Item = T>
, { ... } }
Expand description

List visitor.

See the module documentation for usage.

Required Associated Types

Result of the visit.

Required Methods

Visits an item.

If this returned ControlFlow::Break(v), Context::visit should also return this v.

To feed multiple items at once, do items.into_iter().try_for_each(|item| self.visit_item(item)) for example.

Finishes visiting the list.

Provided Methods

Visits items and finish.

Implementors