Trait AssocVisitor
trait AssocVisitor: Sized + private::Sealed
Associative array visitor.
See [the module documentation][self] for usage.
Associated Types
type ResultResult of the visit.
Required Methods
fn visit_entry<K: fmt::Display, V: fmt::Display>(self: &mut Self, key: K, value: V) -> ControlFlow<<Self as >::Result>Visits an entry.
If this returned
ControlFlow::Break(v),Context::visitshould also return thisv.To feed multiple items at once, do
entries.into_iter().try_for_each(|(key, value)| self.visit_entry(key, value))for example.fn finish(self: Self) -> <Self as >::ResultFinishes visiting the associative array.
Provided Methods
fn visit_entries_and_finish<K, V, I>(self: Self, entries: I) -> <Self as >::Result where K: Display, V: Display, I: IntoIterator<Item = (K, V)>Visits entries and finish.